1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove deprecated ActionDispatch::SystemTestCase#host!

This commit is contained in:
Rafael Mendonça França 2021-10-13 20:52:22 +00:00
parent 4f5989bf91
commit 35645ed17f
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
4 changed files with 6 additions and 22 deletions

View file

@ -1,3 +1,7 @@
* Remove deprecated `ActionDispatch::SystemTestCase#host!`.
*Rafael Mendonça França*
* Remove deprecated `Rails.config.action_dispatch.hosts_response_app`.
*Rafael Mendonça França*

View file

@ -4,14 +4,6 @@ module ActionDispatch
module SystemTesting
module TestHelpers
module SetupAndTeardown # :nodoc:
def host!(host)
ActiveSupport::Deprecation.warn \
"ActionDispatch::SystemTestCase#host! is deprecated with no replacement. " \
"Set Capybara.app_host directly or rely on Capybara's default host."
Capybara.app_host = host
end
def before_teardown
take_failed_screenshot
ensure

View file

@ -42,17 +42,3 @@ class SetDriverToSeleniumHeadlessFirefoxTest < DrivenBySeleniumWithHeadlessFiref
assert_equal :selenium, Capybara.current_driver
end
end
class SetHostTest < DrivenByRackTest
teardown do
Capybara.app_host = nil
end
test "overrides host" do
assert_deprecated do
host! "http://example.com"
end
assert_equal "http://example.com", Capybara.app_host
end
end

View file

@ -56,6 +56,8 @@ Please refer to the [Changelog][action-pack] for detailed changes.
* Remove deprecated `Rails.config.action_dispatch.hosts_response_app`.
* Remove deprecated `ActionDispatch::SystemTestCase#host!`.
### Deprecations
### Notable changes