diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/fixtures/test/_local_inspector.html.erb | 1 | ||||
-rw-r--r-- | actionpack/test/template/render_test.rb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/test/_local_inspector.html.erb b/actionpack/test/fixtures/test/_local_inspector.html.erb new file mode 100644 index 0000000000..c5a6e3e5bc --- /dev/null +++ b/actionpack/test/fixtures/test/_local_inspector.html.erb @@ -0,0 +1 @@ +<%= local_assigns.keys.map(&:to_s).sort.join(",") -%>
\ No newline at end of file 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 |