diff options
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 7db04d178f..2941dfe217 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -35,18 +35,17 @@ class TagHelperTest < ActionView::TestCase end def test_content_tag_with_block - @output_buffer = '' - content_tag(:div) { @output_buffer.concat "Hello world!" } - assert_dom_equal "<div>Hello world!</div>", @output_buffer + content_tag(:div) { concat "Hello world!" } + assert_dom_equal "<div>Hello world!</div>", output_buffer end def test_content_tag_with_block_and_options - @output_buffer = '' - content_tag(:div, :class => "green") { @output_buffer.concat "Hello world!" } - assert_dom_equal %(<div class="green">Hello world!</div>), @output_buffer + content_tag(:div, :class => "green") { concat "Hello world!" } + assert_dom_equal %(<div class="green">Hello world!</div>), output_buffer end def test_content_tag_with_block_and_options_outside_of_action_view + self.output_buffer = nil assert_equal content_tag("a", "Create", :href => "create"), content_tag("a", "href" => "create") { "Create" } end |