diff options
author | lest <just.lest@gmail.com> | 2011-11-30 17:38:09 +0300 |
---|---|---|
committer | lest <just.lest@gmail.com> | 2011-11-30 17:38:09 +0300 |
commit | e975fe710a1a78d723cfd91c07014627f92e3250 (patch) | |
tree | c767e3fd855ceaa12a1ef54d9b20f2e499c10a78 /actionpack/test/template/record_tag_helper_test.rb | |
parent | 271308cb9617b86cd4de20b629be504b48aea537 (diff) | |
download | rails-e975fe710a1a78d723cfd91c07014627f92e3250.tar.gz rails-e975fe710a1a78d723cfd91c07014627f92e3250.tar.bz2 rails-e975fe710a1a78d723cfd91c07014627f92e3250.zip |
test helpers in erb using erb
Diffstat (limited to 'actionpack/test/template/record_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/record_tag_helper_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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 = %(<tr class="post" id="post_45">#{@post.body}</tr>) - 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 = %(<div class="post bar" id="post_45">#{@post.body}</div>) - 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 |