diff options
author | Yehuda Katz <wycats@gmail.com> | 2011-11-19 07:38:22 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2011-11-19 07:38:22 -0800 |
commit | bc04455f1032166e66f5aef06ff2976173ac7da6 (patch) | |
tree | e39f5d5ef5034c820418d87b34d20e88d4c4cfa6 /actionpack/test/template | |
parent | fec85cf10d831ab90386a549ea558b0dd58a813f (diff) | |
parent | 771635e858e486e1e9f2d181b710d81205e6bb4e (diff) | |
download | rails-bc04455f1032166e66f5aef06ff2976173ac7da6.tar.gz rails-bc04455f1032166e66f5aef06ff2976173ac7da6.tar.bz2 rails-bc04455f1032166e66f5aef06ff2976173ac7da6.zip |
Merge pull request #3695 from tobiassvn/partial_path_error
Meaningful errors for unexpected partial arguments. Fixes #3573
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/render_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 77659918f7..c29519276d 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -142,6 +142,13 @@ module RenderTestCases "and is followed by any combinations of letters, numbers, or underscores.", e.message end + def test_render_partial_with_incompatible_object + @view.render(:partial => nil) + flunk "Render did not raise ArgumentError" + rescue ArgumentError => e + assert_equal "'#{nil.inspect}' is not an ActiveModel-compatible object that returns a valid partial path.", e.message + end + def test_render_partial_with_errors @view.render(:partial => "test/raise") flunk "Render did not raise Template::Error" |