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/debug_exceptions_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'actionpack/test/dispatch/debug_exceptions_test.rb') diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 93258fbceb..89c3e75a50 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -42,7 +42,11 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest when "/unprocessable_entity" raise ActionController::InvalidAuthenticityToken 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 when "/missing_template" raise ActionView::MissingTemplate.new(%w(foo), 'foo/index', %w(foo), false, 'mailer') when "/bad_request" @@ -56,12 +60,12 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest when "/syntax_error_into_view" begin eval 'broke_syntax =' - rescue Exception => e + rescue Exception template = ActionView::Template.new(File.read(__FILE__), __FILE__, ActionView::Template::Handlers::Raw.new, {}) - raise ActionView::Template::Error.new(template, e) + raise ActionView::Template::Error.new(template) end when "/framework_raises" method_that_raises -- cgit v1.2.3