diff options
author | Shimpei Makimoto <makimoto@tsuyabu.in> | 2013-10-31 00:48:09 +0900 |
---|---|---|
committer | Shimpei Makimoto <makimoto@tsuyabu.in> | 2013-11-16 04:41:28 +0900 |
commit | 1e848906c594d159da376dc1f41c7869c1f2249e (patch) | |
tree | 64df8725a2740e291468dea6ecb7c0943b56b520 /actionview/test | |
parent | 314e2cc05b6cad93b6e8a3414b2c0106174239be (diff) | |
download | rails-1e848906c594d159da376dc1f41c7869c1f2249e.tar.gz rails-1e848906c594d159da376dc1f41c7869c1f2249e.tar.bz2 rails-1e848906c594d159da376dc1f41c7869c1f2249e.zip |
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 |