aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-03-03 04:01:35 +0000
committerMichael Koziarski <michael@koziarski.com>2008-03-03 04:01:35 +0000
commit51b6619d4e78d9948952dab4709274ab57f41206 (patch)
treebab7a4d988c9349f4d8241e38e09f30d62b0049b /actionpack/test/controller/new_render_test.rb
parent10d9d0b6fe023df1be0d87ca95bb739bb7eb30ba (diff)
downloadrails-51b6619d4e78d9948952dab4709274ab57f41206.tar.gz
rails-51b6619d4e78d9948952dab4709274ab57f41206.tar.bz2
rails-51b6619d4e78d9948952dab4709274ab57f41206.zip
Refactor partial rendering into a PartialTemplate class. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r--actionpack/test/controller/new_render_test.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 928c46cb6d..0f14de54b1 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -146,6 +146,14 @@ class NewRenderTestController < ActionController::Base
def partial_collection
render :partial => "customer", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
+
+ def partial_collection_with_spacer
+ render :partial => "customer", :spacer_template => "partial_only", :collection => [ Customer.new("david"), Customer.new("mary") ]
+ end
+
+ def partial_collection_with_counter
+ render :partial => "customer_counter", :collection => [ Customer.new("david"), Customer.new("mary") ]
+ end
def partial_collection_with_locals
render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" }
@@ -712,11 +720,21 @@ EOS
get :partial_collection
assert_equal "Hello: davidHello: mary", @response.body
end
-
+
+ def test_partial_collection_with_counter
+ get :partial_collection_with_counter
+ assert_equal "david1mary2", @response.body
+ end
+
def test_partial_collection_with_locals
get :partial_collection_with_locals
assert_equal "Bonjour: davidBonjour: mary", @response.body
end
+
+ def test_partial_collection_with_spacer
+ get :partial_collection_with_spacer
+ assert_equal "Hello: davidonly partialHello: mary", @response.body
+ end
def test_partial_collection_shorthand_with_locals
get :partial_collection_shorthand_with_locals