Skip to content

Commit

Permalink
Remove deprecated ActionDispatch::SystemTestCase#host!
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Nov 17, 2021
1 parent 4f5989b commit 35645ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
4 changes: 4 additions & 0 deletions actionpack/CHANGELOG.md
@@ -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*
Expand Down
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions actionpack/test/dispatch/system_testing/system_test_case_test.rb
Expand Up @@ -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
2 changes: 2 additions & 0 deletions guides/source/7_0_release_notes.md
Expand Up @@ -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
Expand Down

0 comments on commit 35645ed

Please sign in to comment.