diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-09 18:00:28 -0800 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-09 23:44:12 -0800 |
commit | 4464b8e87bedd69816d4658c9386cc360affb62e (patch) | |
tree | 72598e47159bbdf36cdb4fcfd31682dce4877b9e /actionpack/test/template/tag_helper_test.rb | |
parent | f30b7a0903ac1859a139bce96856d228c59a80b7 (diff) | |
download | rails-4464b8e87bedd69816d4658c9386cc360affb62e.tar.gz rails-4464b8e87bedd69816d4658c9386cc360affb62e.tar.bz2 rails-4464b8e87bedd69816d4658c9386cc360affb62e.zip |
Deprecate block_called_from_erb? pending a solution for getting it into apps
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 3858ffde40..256d9bdcde 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -42,15 +42,13 @@ class TagHelperTest < ActionView::TestCase end def test_content_tag_with_block_in_erb - __in_erb_template = '' - content_tag(:div) { concat "Hello world!" } - assert_dom_equal "<div>Hello world!</div>", output_buffer + buffer = content_tag(:div) { concat "Hello world!" } + assert_dom_equal "<div>Hello world!</div>", buffer end def test_content_tag_with_block_and_options_in_erb - __in_erb_template = '' - content_tag(:div, :class => "green") { concat "Hello world!" } - assert_dom_equal %(<div class="green">Hello world!</div>), output_buffer + buffer = content_tag(:div, :class => "green") { concat "Hello world!" } + assert_dom_equal %(<div class="green">Hello world!</div>), buffer end def test_content_tag_with_block_and_options_out_of_erb @@ -68,10 +66,10 @@ class TagHelperTest < ActionView::TestCase output_buffer end + # TAG TODO: Move this into a real template def test_content_tag_nested_in_content_tag_in_erb - __in_erb_template = true - content_tag("p") { concat content_tag("b", "Hello") } - assert_equal '<p><b>Hello</b></p>', output_buffer + buffer = content_tag("p") { concat content_tag("b", "Hello") } + assert_equal '<p><b>Hello</b></p>', buffer end def test_content_tag_with_escaped_array_class |