Fix path where test-app is getting configured

This commit is contained in:
Andrey Krivko 2014-09-29 18:07:56 +07:00
parent dce6e59772
commit 1875cab64a
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,9 @@ class TestApp < Rails::Application
config.eager_load = false
config.secret_key_base = 'abc123'
end
config.after_initialize do
Rails.application.routes.default_url_options = { host: 'http://example.com' }
end
# Set up a logger to avoid creating a log directory on every run.
config.logger = Logger.new(nil)

View File

@ -20,7 +20,5 @@ end
ActionController::TestCase.class_eval do
def setup
@routes = TestHelper::Routes
Rails.application.routes.default_url_options[:host] = 'http://example.com' if defined?(Rails)
end
end