From 0bdb7d353b4ac6f5470884360f9a480a16bd709c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 2 Jun 2008 13:32:58 -0700 Subject: Work with @output_buffer instead of _erbout --- actionpack/test/template/record_tag_helper_test.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'actionpack/test/template/record_tag_helper_test.rb') diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index 0afbb54f57..c39e5c69bf 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -17,37 +17,37 @@ class RecordTagHelperTest < ActionView::TestCase end def test_content_tag_for - _erbout = '' + @output_buffer = '' expected = %(
  • ) actual = content_tag_for(:li, @post, :class => 'bar') { } assert_dom_equal expected, actual end def test_content_tag_for_prefix - _erbout = '' + @output_buffer = '' expected = %() actual = content_tag_for(:ul, @post, :archived) { } assert_dom_equal expected, actual end def test_content_tag_for_with_extra_html_tags - _erbout = '' + @output_buffer = '' expected = %() actual = content_tag_for(:tr, @post, {:class => "bar", :style => "background-color: #f0f0f0"}) { } assert_dom_equal expected, actual end def test_block_works_with_content_tag_for - _erbout = '' + @output_buffer = '' expected = %(#{@post.body}) - actual = content_tag_for(:tr, @post) { _erbout.concat @post.body } + actual = content_tag_for(:tr, @post) { @output_buffer.concat @post.body } assert_dom_equal expected, actual end def test_div_for - _erbout = '' + @output_buffer = '' expected = %(
    #{@post.body}
    ) - actual = div_for(@post, :class => "bar") { _erbout.concat @post.body } + actual = div_for(@post, :class => "bar") { @output_buffer.concat @post.body } assert_dom_equal expected, actual end -- cgit v1.2.3 From ff5f155f8dc1d2ba363718c3e17f99719399eab5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 8 Jun 2008 20:05:39 -0700 Subject: Use output_buffer reader and writer methods exclusively instead of hitting the instance variable so others can override the methods. --- actionpack/test/template/record_tag_helper_test.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'actionpack/test/template/record_tag_helper_test.rb') diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index c39e5c69bf..441dc6b720 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -17,37 +17,32 @@ class RecordTagHelperTest < ActionView::TestCase end def test_content_tag_for - @output_buffer = '' expected = %(
  • ) actual = content_tag_for(:li, @post, :class => 'bar') { } assert_dom_equal expected, actual end def test_content_tag_for_prefix - @output_buffer = '' expected = %() actual = content_tag_for(:ul, @post, :archived) { } assert_dom_equal expected, actual end def test_content_tag_for_with_extra_html_tags - @output_buffer = '' expected = %() actual = content_tag_for(:tr, @post, {:class => "bar", :style => "background-color: #f0f0f0"}) { } assert_dom_equal expected, actual end def test_block_works_with_content_tag_for - @output_buffer = '' expected = %(#{@post.body}) - actual = content_tag_for(:tr, @post) { @output_buffer.concat @post.body } + actual = content_tag_for(:tr, @post) { concat @post.body } assert_dom_equal expected, actual end def test_div_for - @output_buffer = '' expected = %(
    #{@post.body}
    ) - actual = div_for(@post, :class => "bar") { @output_buffer.concat @post.body } + actual = div_for(@post, :class => "bar") { concat @post.body } assert_dom_equal expected, actual end -- cgit v1.2.3