diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-15 18:19:20 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-15 18:19:20 -0800 |
commit | dd184e4b44074a64db27a4ed8c141d26418caef2 (patch) | |
tree | 73820649320a9693fe9ab146e71e0e433f5ecf0e /actionview/test | |
parent | 66f168150661af39fc7af717a4e414212f44dbcf (diff) | |
parent | 1e848906c594d159da376dc1f41c7869c1f2249e (diff) | |
download | rails-dd184e4b44074a64db27a4ed8c141d26418caef2.tar.gz rails-dd184e4b44074a64db27a4ed8c141d26418caef2.tar.bz2 rails-dd184e4b44074a64db27a4ed8c141d26418caef2.zip |
Merge pull request #12703 from makimoto/actionsupport-error-set_backtrace
Use set_backtrace instead of @backtrace in ActionView error
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/template_error_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/template_error_test.rb b/actionview/test/template/template_error_test.rb index 91424daeed..3971ec809c 100644 --- a/actionview/test/template/template_error_test.rb +++ b/actionview/test/template/template_error_test.rb @@ -6,6 +6,13 @@ class TemplateErrorTest < ActiveSupport::TestCase assert_equal "original", error.message end + def test_provides_original_backtrace + original_exception = Exception.new + original_exception.set_backtrace(%W[ foo bar baz ]) + error = ActionView::Template::Error.new("test", original_exception) + assert_equal %W[ foo bar baz ], error.backtrace + end + def test_provides_useful_inspect error = ActionView::Template::Error.new("test", Exception.new("original")) assert_equal "#<ActionView::Template::Error: original>", error.inspect |