diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-18 10:52:37 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-18 10:52:37 -0800 |
commit | 54de7048a56840d853bb14333cefeb0a3a961133 (patch) | |
tree | f134aa328d647bb9f4753e5a13c6625665e672d4 /actionpack/test | |
parent | e6881217ed8d7a20f70bb482a43512978fc4fc3b (diff) | |
parent | 403b06e98ee88b96b6fbd8692f072fdfa7857639 (diff) | |
download | rails-54de7048a56840d853bb14333cefeb0a3a961133.tar.gz rails-54de7048a56840d853bb14333cefeb0a3a961133.tar.bz2 rails-54de7048a56840d853bb14333cefeb0a3a961133.zip |
Merge branch 'template_error' into merge
* template_error:
Ensure original exception message is present in both Template::Error#message and Template::Error#inspect.
ActiveSupport::Deprecation.silence no longer needed.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/template_error_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/template/template_error_test.rb b/actionpack/test/template/template_error_test.rb new file mode 100644 index 0000000000..3a874082d9 --- /dev/null +++ b/actionpack/test/template/template_error_test.rb @@ -0,0 +1,13 @@ +require "abstract_unit" + +class TemplateErrorTest < ActiveSupport::TestCase + def test_provides_original_message + error = ActionView::Template::Error.new("test", {}, Exception.new("original")) + assert_equal "original", error.message + end + + def test_provides_useful_inspect + error = ActionView::Template::Error.new("test", {}, Exception.new("original")) + assert_equal "#<ActionView::Template::Error: original>", error.inspect + end +end |