diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-07-02 17:19:41 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-07-02 17:19:41 +0100 |
commit | 267d3964ebd7bbc8879d69ff5a323527179c497d (patch) | |
tree | b6e88cece3c135bc2e21e8a19d9c2945633741ef /actionpack/test/template | |
parent | 2b43620e3c1352028f19550fcde4632d65cbd191 (diff) | |
download | rails-267d3964ebd7bbc8879d69ff5a323527179c497d.tar.gz rails-267d3964ebd7bbc8879d69ff5a323527179c497d.tar.bz2 rails-267d3964ebd7bbc8879d69ff5a323527179c497d.zip |
Make sure render :collection doesnt set nil local when :as is absent
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/render_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb index 64244e50f7..5163c35189 100644 --- a/actionpack/test/template/render_test.rb +++ b/actionpack/test/template/render_test.rb @@ -59,6 +59,11 @@ class ViewRenderTest < Test::Unit::TestCase 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_without_as + assert_equal "local_inspector,local_inspector_counter,object", + @view.render(:partial => "test/local_inspector", :collection => [ Customer.new("mary") ]) + end # TODO: The reason for this test is unclear, improve documentation def test_render_partial_and_fallback_to_layout |