diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-17 22:49:00 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-18 00:44:25 -0200 |
commit | 5c997ccadd0014577c4b67d92fdeeb53bdad9637 (patch) | |
tree | 4c0153e264811d9e861570e12913b3903c178ee2 /actionpack/test | |
parent | 69512e1a0e5adf1bcfbda7aee7d75ea2b183fb50 (diff) | |
download | rails-5c997ccadd0014577c4b67d92fdeeb53bdad9637.tar.gz rails-5c997ccadd0014577c4b67d92fdeeb53bdad9637.tar.bz2 rails-5c997ccadd0014577c4b67d92fdeeb53bdad9637.zip |
No need for concat as well
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/record_tag_helper_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index 247704928e..a349f803de 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -80,7 +80,7 @@ class RecordTagHelperTest < ActionView::TestCase post_1 = Post.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true } post_2 = Post.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true } expected = %(<li class="post" id="post_101">Hello!</li>\n<li class="post" id="post_102">World!</li>) - actual = content_tag_for(:li, [post_1, post_2]) { |post| concat post.body } + actual = content_tag_for(:li, [post_1, post_2]) { |post| post.body } assert_dom_equal expected, actual end @@ -88,19 +88,19 @@ class RecordTagHelperTest < ActionView::TestCase post_1 = Post.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true } post_2 = Post.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true } expected = %(<div class="post" id="post_101">Hello!</div>\n<div class="post" id="post_102">World!</div>) - actual = div_for([post_1, post_2]) { |post| concat post.body } + actual = div_for([post_1, post_2]) { |post| post.body } assert_dom_equal expected, actual end def test_content_tag_for_single_record_is_html_safe - result = div_for(@post, :class => "bar") { concat @post.body } + result = div_for(@post, :class => "bar") { @post.body } assert result.html_safe? end def test_content_tag_for_collection_is_html_safe post_1 = Post.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true } post_2 = Post.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true } - result = content_tag_for(:li, [post_1, post_2]) { |post| concat post.body } + result = content_tag_for(:li, [post_1, post_2]) { |post| post.body } assert result.html_safe? end end |