diff options
author | Akira Matsuda <ronnie@dio.jp> | 2010-12-25 23:54:34 +0900 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-01 13:01:54 -0200 |
commit | 5dd803e9b1149f8e6d7de787e0c833c94f48d5a4 (patch) | |
tree | 1704319e94fad632bf807e8ad3c203862b782ee0 /actionpack/test | |
parent | 6bd9fac1e301d57765073e1f7a17e46972428205 (diff) | |
download | rails-5dd803e9b1149f8e6d7de787e0c833c94f48d5a4.tar.gz rails-5dd803e9b1149f8e6d7de787e0c833c94f48d5a4.tar.bz2 rails-5dd803e9b1149f8e6d7de787e0c833c94f48d5a4.zip |
Accept String value for render_partial :as option
[#6222 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/render_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 38bedd2e4e..e02d69231f 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -146,7 +146,12 @@ module RenderTestCases assert_equal "Hello: davidHello: mary", @view.render(:partial => "test/customer", :collection => [ Customer.new("david"), Customer.new("mary") ]) end - def test_render_partial_collection_as + def test_render_partial_collection_as_by_string + assert_equal "david david davidmary mary mary", + @view.render(:partial => "test/customer_with_var", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => 'customer') + end + + def test_render_partial_collection_as_by_symbol assert_equal "david david davidmary mary mary", @view.render(:partial => "test/customer_with_var", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => :customer) end |