From ab105e6072d291d7024e4e645defa5eff31f6f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 16 Apr 2011 11:34:07 +0200 Subject: content_for should work with provide. --- actionpack/test/template/capture_helper_test.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'actionpack/test/template/capture_helper_test.rb') diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb index c2f0825375..a9a36e6e6b 100644 --- a/actionpack/test/template/capture_helper_test.rb +++ b/actionpack/test/template/capture_helper_test.rb @@ -47,13 +47,16 @@ class CaptureHelperTest < ActionView::TestCase def test_provide assert !content_for?(:title) - provide :title, "title" + provide :title, "hi" assert content_for?(:title) - assert_equal "title", @_view_flow.get(:title) + assert_equal "hi", @_view_flow.get(:title) provide :title, "

title

" - assert_equal "<p>title</p>", @_view_flow.get(:title) + assert_equal "hi<p>title</p>", @_view_flow.get(:title) + + @_view_flow = ActionView::OutputFlow.new + provide :title, "hi" provide :title, "

title

".html_safe - assert_equal "

title

", @_view_flow.get(:title) + assert_equal "hi

title

", @_view_flow.get(:title) end def test_with_output_buffer_swaps_the_output_buffer_given_no_argument -- cgit v1.2.3