diff options
author | Tobias Svensson <tob@tobiassvensson.co.uk> | 2011-11-19 13:02:56 +0000 |
---|---|---|
committer | Tobias Svensson <tob@tobiassvensson.co.uk> | 2011-11-19 13:05:57 +0000 |
commit | 771635e858e486e1e9f2d181b710d81205e6bb4e (patch) | |
tree | fe53145ddd22a3e99861fd5f1600e2133ac1df62 /actionpack/test | |
parent | 11afb74089b0e8ad9b85de3f3fcb1f6dd179fa66 (diff) | |
download | rails-771635e858e486e1e9f2d181b710d81205e6bb4e.tar.gz rails-771635e858e486e1e9f2d181b710d81205e6bb4e.tar.bz2 rails-771635e858e486e1e9f2d181b710d81205e6bb4e.zip |
Meaningful errors for unexpected partial arguments. Fixes #3573
Diffstat (limited to 'actionpack/test')
-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" |