diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-02 04:05:05 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-02 04:05:05 -0800 |
commit | 204109eac9708d615bd88d60b0b7e5d265941423 (patch) | |
tree | 408f5745eb670b9b24c671ab8a25be2b58579b7e /actionpack/test/template | |
parent | b366ec51efa14341cb568790c42b8c273d4f4d90 (diff) | |
parent | ea881ca85a1a9df3c25e2ee8668d98416a5c1acb (diff) | |
download | rails-204109eac9708d615bd88d60b0b7e5d265941423.tar.gz rails-204109eac9708d615bd88d60b0b7e5d265941423.tar.bz2 rails-204109eac9708d615bd88d60b0b7e5d265941423.zip |
Merge pull request #8640 from jasl/3-2-stable
fix block.arity will raise nil error
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/record_tag_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index f33471ab28..3cb5997a83 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -81,6 +81,14 @@ class RecordTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end + def test_content_tag_for_collection_without_given_block + post_1 = RecordTagPost.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true } + post_2 = RecordTagPost.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true } + expected = %(<li class="record_tag_post" id="record_tag_post_101"></li>\n<li class="record_tag_post" id="record_tag_post_102"></li>) + actual = content_tag_for(:li, [post_1, post_2]) + assert_dom_equal expected, actual + end + def test_div_for_collection post_1 = RecordTagPost.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true } post_2 = RecordTagPost.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true } |