diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 17:48:30 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 17:48:30 -0500 |
commit | ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1 (patch) | |
tree | a3cce25be0c613a8e1444e1d0ff53aaed3497057 /actionpack/test/template/form_tag_helper_test.rb | |
parent | 556204abaf95f7c995576cb1358f13de406682ab (diff) | |
parent | dd4181f47dc0f166eb5d3e47a4a0dc1594cc5669 (diff) | |
download | rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.tar.gz rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.tar.bz2 rails-ea3a7e1bb1efc8b3ca10c4163bc116f3d5e23af1.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test/template/form_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 73a8bd4d87..47b3605849 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -43,19 +43,17 @@ class FormTagHelperTest < ActionView::TestCase end def test_form_tag_with_block - _erbout = '' - form_tag("http://example.com") { _erbout.concat "Hello world!" } + form_tag("http://example.com") { concat "Hello world!" } expected = %(<form action="http://example.com" method="post">Hello world!</form>) - assert_dom_equal expected, _erbout + assert_dom_equal expected, output_buffer end def test_form_tag_with_block_and_method - _erbout = '' - form_tag("http://example.com", :method => :put) { _erbout.concat "Hello world!" } + form_tag("http://example.com", :method => :put) { concat "Hello world!" } expected = %(<form action="http://example.com" method="post"><div style='margin:0;padding:0'><input type="hidden" name="_method" value="put" /></div>Hello world!</form>) - assert_dom_equal expected, _erbout + assert_dom_equal expected, output_buffer end def test_hidden_field_tag @@ -234,23 +232,22 @@ class FormTagHelperTest < ActionView::TestCase end def test_field_set_tag - _erbout = '' - field_set_tag("Your details") { _erbout.concat "Hello world!" } + field_set_tag("Your details") { concat "Hello world!" } expected = %(<fieldset><legend>Your details</legend>Hello world!</fieldset>) - assert_dom_equal expected, _erbout + assert_dom_equal expected, output_buffer - _erbout = '' - field_set_tag { _erbout.concat "Hello world!" } + self.output_buffer = '' + field_set_tag { concat "Hello world!" } expected = %(<fieldset>Hello world!</fieldset>) - assert_dom_equal expected, _erbout - - _erbout = '' - field_set_tag('') { _erbout.concat "Hello world!" } + assert_dom_equal expected, output_buffer + + self.output_buffer = '' + field_set_tag('') { concat "Hello world!" } expected = %(<fieldset>Hello world!</fieldset>) - assert_dom_equal expected, _erbout + assert_dom_equal expected, output_buffer end def protect_against_forgery? |