aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2019-07-24 08:16:23 -0400
committerGitHub <noreply@github.com>2019-07-24 08:16:23 -0400
commitbee689dad9e2a42ebc3fc398ed9d316825e217cf (patch)
tree2ad476b61c4b7d37cc7b15b59d114c2c77fd9548 /actionpack
parent6cd364cfe5cc36b5754139967780f9f3b6ddd503 (diff)
parente6cf57df8a609c697c0bc593576f06895414da64 (diff)
downloadrails-bee689dad9e2a42ebc3fc398ed9d316825e217cf.tar.gz
rails-bee689dad9e2a42ebc3fc398ed9d316825e217cf.tar.bz2
rails-bee689dad9e2a42ebc3fc398ed9d316825e217cf.zip
Merge pull request #36741 from Edouard-chin/ec-system-test-url-options
Define the `url_options` needed for SytemTest inside the route proxy:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/system_test_case.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/system_test_case.rb b/actionpack/lib/action_dispatch/system_test_case.rb
index 9772beb8aa..4fda2cf44f 100644
--- a/actionpack/lib/action_dispatch/system_test_case.rb
+++ b/actionpack/lib/action_dispatch/system_test_case.rb
@@ -120,7 +120,13 @@ module ActionDispatch
super
self.class.driver.use
@proxy_route = if ActionDispatch.test_app
- Class.new { include ActionDispatch.test_app.routes.url_helpers }.new
+ Class.new do
+ include ActionDispatch.test_app.routes.url_helpers
+
+ def url_options
+ default_url_options.merge(host: Capybara.app_host)
+ end
+ end.new
else
nil
end
@@ -164,10 +170,6 @@ module ActionDispatch
driven_by :selenium
- def url_options # :nodoc:
- default_url_options.merge(host: Capybara.app_host)
- end
-
def method_missing(method, *args, &block)
if @proxy_route.respond_to?(method)
@proxy_route.send(method, *args, &block)