aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/record_tag_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-08 20:05:39 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-08 20:05:39 -0700
commitff5f155f8dc1d2ba363718c3e17f99719399eab5 (patch)
tree6d6e353284cc9c630697ae92f710df499d2f8197 /actionpack/test/template/record_tag_helper_test.rb
parentd9fb021845c0481c5119eebdc534aec427072f7d (diff)
downloadrails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.tar.gz
rails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.tar.bz2
rails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.zip
Use output_buffer reader and writer methods exclusively instead of hitting the instance variable so others can override the methods.
Diffstat (limited to 'actionpack/test/template/record_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/record_tag_helper_test.rb9
1 files changed, 2 insertions, 7 deletions
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 = %(<li class="post bar" id="post_45"></li>)
actual = content_tag_for(:li, @post, :class => 'bar') { }
assert_dom_equal expected, actual
end
def test_content_tag_for_prefix
- @output_buffer = ''
expected = %(<ul class="post" id="archived_post_45"></ul>)
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 = %(<tr class="post bar" id="post_45" style='background-color: #f0f0f0'></tr>)
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 = %(<tr class="post" id="post_45">#{@post.body}</tr>)
- 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 = %(<div class="post bar" id="post_45">#{@post.body}</div>)
- 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