diff options
Diffstat (limited to 'actionpack/test/controller/base_test.rb')
-rw-r--r-- | actionpack/test/controller/base_test.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index f2b054c849..76e5786e70 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -161,7 +161,9 @@ class PerformActionTest < ActionController::TestCase def test_get_on_priv_should_show_selector use_controller MethodMissingController - get :shouldnt_be_called + assert_deprecated /Using `method_missing` to handle .* use `action_missing` instead/ do + get :shouldnt_be_called + end assert_response :success assert_equal 'shouldnt_be_called', @response.body end @@ -170,21 +172,25 @@ class PerformActionTest < ActionController::TestCase use_controller MethodMissingController assert !@controller.__send__(:action_method?, 'method_missing') - get :method_missing + assert_deprecated /Using `method_missing` to handle .* use `action_missing` instead/ do + get :method_missing + end assert_response :success assert_equal 'method_missing', @response.body end def test_method_missing_should_recieve_symbol use_controller AnotherMethodMissingController - get :some_action + assert_deprecated /Using `method_missing` to handle .* use `action_missing` instead/ do + get :some_action + end assert_kind_of NameError, @controller._exception end 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 |