Skip to content

Commit

Permalink
Remove ActionController::TestCase#rescue_action_in_public!
Browse files Browse the repository at this point in the history
This method has no effect since exception handling was
moved to middlewares and ActionController tests do not
use any middlewares.
  • Loading branch information
drogus committed Mar 15, 2012
1 parent e884f4b commit 5b94e73
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions actionpack/lib/action_controller/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,6 @@ def setup_controller_request_and_response
end
end

# Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local
def rescue_action_in_public!
@request.remote_addr = '208.77.188.166' # example.com
end

included do
include ActionController::TemplateAssertions
include ActionDispatch::Assertions
Expand Down
5 changes: 0 additions & 5 deletions actionpack/test/controller/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ def use_controller(controller_class)
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@request.host = "www.nextangle.com"

rescue_action_in_public!
end

def test_process_should_be_precise
Expand All @@ -155,7 +153,6 @@ class UrlOptionsTest < ActionController::TestCase
def setup
super
@request.host = 'www.example.com'
rescue_action_in_public!
end

def test_url_for_query_params_included
Expand Down Expand Up @@ -206,7 +203,6 @@ class DefaultUrlOptionsTest < ActionController::TestCase
def setup
super
@request.host = 'www.example.com'
rescue_action_in_public!
end

def test_default_url_options_override
Expand Down Expand Up @@ -257,7 +253,6 @@ class EmptyUrlOptionsTest < ActionController::TestCase
def setup
super
@request.host = 'www.example.com'
rescue_action_in_public!
end

def test_ensure_url_for_works_as_expected_when_called_with_no_options_if_default_url_options_is_not_set
Expand Down

0 comments on commit 5b94e73

Please sign in to comment.