diff options
author | Federico Ravasio <ravasio.federico@gmail.com> | 2013-08-23 09:57:10 +0200 |
---|---|---|
committer | Federico Ravasio <ravasio.federico@gmail.com> | 2013-11-24 14:40:33 +0100 |
commit | 5f6b7c96fb3388bdd8488282f303f2e058c5a8fa (patch) | |
tree | ffa48e82fde4a8a85cc0e59b25953383c398e439 /actionview | |
parent | a0f1e6a27ae1a9593c107296d132b4c5605a7175 (diff) | |
download | rails-5f6b7c96fb3388bdd8488282f303f2e058c5a8fa.tar.gz rails-5f6b7c96fb3388bdd8488282f303f2e058c5a8fa.tar.bz2 rails-5f6b7c96fb3388bdd8488282f303f2e058c5a8fa.zip |
Use NameError#name to assert raised error.
This makes the test compatible with other Ruby implementations, which
may implement error messages differently.
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/test/template/render_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 5a7d11f513..0395ce3735 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -319,7 +319,7 @@ module RenderTestCases exception = assert_raises ActionView::Template::Error do @controller_view.render("partial_name_local_variable") end - assert_match "undefined local variable or method `partial_name_local_variable'", exception.message + assert_equal :partial_name_local_variable, exception.original_exception.name end # TODO: The reason for this test is unclear, improve documentation |