From d415eb4f6d6bb24b78b968ae28c22bb7e1721285 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 24 Jul 2019 22:19:21 -0400 Subject: Stop setting a default Capybara app host It's intended not to be set if Capybara starts the app server itself. Base Rails-generated URLs off of Capybara.current_session.server_url instead. --- .../system_testing/test_helpers/setup_and_teardown.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_dispatch/system_testing/test_helpers') diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb index 20f6a7634f..30dc21ebb9 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb @@ -4,15 +4,12 @@ module ActionDispatch module SystemTesting module TestHelpers module SetupAndTeardown # :nodoc: - DEFAULT_HOST = "http://127.0.0.1" - def host!(host) - Capybara.app_host = host - end + ActiveSupport::Deprecation.warn \ + "ActionDispatch::SystemTestCase#host! is deprecated with no replacement. " \ + "Set Capybara.app_host directly or rely on Capybara's default host." - def before_setup - host! DEFAULT_HOST - super + Capybara.app_host = host end def before_teardown -- cgit v1.2.3