Skip to content

Commit 1875cab

Browse files
committed
Fix path where test-app is getting configured
1 parent dce6e59 commit 1875cab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/test_app.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ class TestApp < Rails::Application
33
config.eager_load = false
44
config.secret_key_base = 'abc123'
55
end
6+
config.after_initialize do
7+
Rails.application.routes.default_url_options = { host: 'http://example.com' }
8+
end
69

710
# Set up a logger to avoid creating a log directory on every run.
811
config.logger = Logger.new(nil)

test/test_helper.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ module TestHelper
2020
ActionController::TestCase.class_eval do
2121
def setup
2222
@routes = TestHelper::Routes
23-
24-
Rails.application.routes.default_url_options[:host] = 'http://example.com' if defined?(Rails)
2523
end
2624
end

0 commit comments

Comments
 (0)