diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-17 09:58:52 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-17 18:07:08 -0200 |
commit | e5e87041ceafc64d11a01e5a1c7ce1f978a788a6 (patch) | |
tree | 872b2ac666e18b0ec4c75aad6ce8bf135e1462f5 /actionpack/test | |
parent | 9d4fd613a69378b38b061580e6b979e61fe9a823 (diff) | |
download | rails-e5e87041ceafc64d11a01e5a1c7ce1f978a788a6.tar.gz rails-e5e87041ceafc64d11a01e5a1c7ce1f978a788a6.tar.bz2 rails-e5e87041ceafc64d11a01e5a1c7ce1f978a788a6.zip |
Deprecate AC::UnknownError and AC::DoubleRenderError
Use the constants AbstractController::ActionNotFound and
AbstractController::DoubleRenderError respectively instead.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/render_test.rb | 10 | ||||
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index b11fc02604..76e5786e70 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -189,8 +189,8 @@ class PerformActionTest < ActionController::TestCase def test_get_on_hidden_should_fail use_controller NonEmptyController - assert_raise(ActionController::UnknownAction) { get :hidden_action } - assert_raise(ActionController::UnknownAction) { get :another_hidden_action } + assert_raise(AbstractController::ActionNotFound) { get :hidden_action } + assert_raise(AbstractController::ActionNotFound) { get :another_hidden_action } end end diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 0bac073154..28f6bc88e0 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -893,12 +893,12 @@ class RenderTest < ActionController::TestCase # :ported: def test_attempt_to_access_object_method - assert_raise(ActionController::UnknownAction, "No action responded to [clone]") { get :clone } + assert_raise(AbstractController::ActionNotFound, "No action responded to [clone]") { get :clone } end # :ported: def test_private_methods - assert_raise(ActionController::UnknownAction, "No action responded to [determine_layout]") { get :determine_layout } + assert_raise(AbstractController::ActionNotFound, "No action responded to [determine_layout]") { get :determine_layout } end # :ported: @@ -1098,15 +1098,15 @@ class RenderTest < ActionController::TestCase # :ported: def test_double_render - assert_raise(ActionController::DoubleRenderError) { get :double_render } + assert_raise(AbstractController::DoubleRenderError) { get :double_render } end def test_double_redirect - assert_raise(ActionController::DoubleRenderError) { get :double_redirect } + assert_raise(AbstractController::DoubleRenderError) { get :double_redirect } end def test_render_and_redirect - assert_raise(ActionController::DoubleRenderError) { get :render_and_redirect } + assert_raise(AbstractController::DoubleRenderError) { get :render_and_redirect } end # specify the one exception to double render rule - render_to_string followed by render diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index f3dc160d7d..c3a565990e 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -24,7 +24,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest when "/pass" [404, { "X-Cascade" => "pass" }, self] when "/not_found" - raise ActionController::UnknownAction + raise AbstractController::ActionNotFound when "/runtime_error" raise RuntimeError when "/method_not_allowed" @@ -83,7 +83,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest get "/not_found", {}, {'action_dispatch.show_exceptions' => true} assert_response 404 - assert_match(/#{ActionController::UnknownAction.name}/, body) + assert_match(/#{AbstractController::ActionNotFound.name}/, body) get "/method_not_allowed", {}, {'action_dispatch.show_exceptions' => true} assert_response 405 diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index e9504f3524..4a6d5ddbf7 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -7,7 +7,7 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest req = ActionDispatch::Request.new(env) case req.path when "/not_found" - raise ActionController::UnknownAction + raise AbstractController::ActionNotFound when "/method_not_allowed" raise ActionController::MethodNotAllowed when "/not_found_original_exception" |