From e975fe710a1a78d723cfd91c07014627f92e3250 Mon Sep 17 00:00:00 2001 From: lest Date: Wed, 30 Nov 2011 17:38:09 +0300 Subject: test helpers in erb using erb --- actionpack/test/template/record_tag_helper_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 7f23629e05..ec777d15c4 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -22,6 +22,8 @@ class Post end class RecordTagHelperTest < ActionView::TestCase + include RenderERBUtils + tests ActionView::Helpers::RecordTagHelper def setup @@ -58,13 +60,13 @@ class RecordTagHelperTest < ActionView::TestCase def test_block_works_with_content_tag_for_in_erb expected = %(#{@post.body}) - actual = content_tag_for(:tr, @post) { concat @post.body } + actual = render_erb("<%= content_tag_for(:tr, @post) do %><%= @post.body %><% end %>") assert_dom_equal expected, actual end def test_div_for_in_erb expected = %(
#{@post.body}
) - actual = div_for(@post, :class => "bar") { concat @post.body } + actual = render_erb("<%= div_for(@post, :class => 'bar') do %><%= @post.body %><% end %>") assert_dom_equal expected, actual end -- cgit v1.2.3