From 266455cf25aba942b8717ceb0269d66f719b5696 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Tue, 3 Nov 2015 06:54:34 -0800 Subject: Deprecate exception#original_exception in favor of exception#cause --- actionpack/test/dispatch/show_exceptions_test.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'actionpack/test/dispatch/show_exceptions_test.rb') diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 15dd702161..ffdf775836 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -9,13 +9,21 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest when "/not_found" raise AbstractController::ActionNotFound when "/bad_params" - raise ActionDispatch::ParamsParser::ParseError.new("", StandardError.new) + begin + raise StandardError.new + rescue + raise ActionDispatch::ParamsParser::ParseError + end when "/method_not_allowed" raise ActionController::MethodNotAllowed, 'PUT' when "/unknown_http_method" raise ActionController::UnknownHttpMethod when "/not_found_original_exception" - raise ActionView::Template::Error.new('template', AbstractController::ActionNotFound.new) + begin + raise AbstractController::ActionNotFound.new + rescue + raise ActionView::Template::Error.new('template') + end else raise "puke!" end -- cgit v1.2.3