aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/subscriber_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-15 17:43:45 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-15 17:43:45 +0100
commit1c30ec23fef2479cd037945e57a74e5c89c9ece1 (patch)
tree35a2da13043525e640da09344a8c0a5b77259e31 /actionpack/test/template/subscriber_test.rb
parenta0cdfdc771cd4034f69c9a08a188cf6ba7b110c2 (diff)
downloadrails-1c30ec23fef2479cd037945e57a74e5c89c9ece1.tar.gz
rails-1c30ec23fef2479cd037945e57a74e5c89c9ece1.tar.bz2
rails-1c30ec23fef2479cd037945e57a74e5c89c9ece1.zip
In heterogeneous collections, neither the @path nor the @template are available, so we need to tell that we are simply rendering a collection.
Diffstat (limited to 'actionpack/test/template/subscriber_test.rb')
-rw-r--r--actionpack/test/template/subscriber_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/subscriber_test.rb b/actionpack/test/template/subscriber_test.rb
index 2f58638364..d64637f141 100644
--- a/actionpack/test/template/subscriber_test.rb
+++ b/actionpack/test/template/subscriber_test.rb
@@ -63,6 +63,16 @@ module ActionViewSubscriberTest
assert_match /Rendered test\/_customer.erb/, @logger.logged(:info).last
end
+ def test_render_collection_template_without_path
+ @view.stubs(:controller_path).returns("test")
+ @view.render([ GoodCustomer.new("david"), Customer.new("mary") ], :greeting => "hi")
+ wait
+
+ assert_equal 1, @logger.logged(:info).size
+ assert_match /Rendered collection/, @logger.logged(:info).last
+ end
+
+
class SyncSubscriberTest < ActiveSupport::TestCase
include Rails::Subscriber::SyncTestHelper
include ActionViewSubscriberTest