aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/debug_exceptions_test.rb
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2015-11-03 08:33:46 -0700
committerJeremy Daer <jeremydaer@gmail.com>2015-11-03 08:33:46 -0700
commite670611e6002039231a24d547f9a6e053940fb16 (patch)
tree7acbeba7f649906f8821d7a97412b453cd2c8f3a /actionpack/test/dispatch/debug_exceptions_test.rb
parente4000e3aa78b06bdda39ba0a4d5f1cb5f7d21609 (diff)
parent266455cf25aba942b8717ceb0269d66f719b5696 (diff)
downloadrails-e670611e6002039231a24d547f9a6e053940fb16.tar.gz
rails-e670611e6002039231a24d547f9a6e053940fb16.tar.bz2
rails-e670611e6002039231a24d547f9a6e053940fb16.zip
Merge pull request #18774 from yuki24/deprecate-original-exception-infavor-of-cause
Deprecate exception#original_exception in favor of exception#cause
Diffstat (limited to 'actionpack/test/dispatch/debug_exceptions_test.rb')
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb10
1 files changed, 7 insertions, 3 deletions
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