From e732a405ab7d0d04f8a254764970c9dcda988f01 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 6 Jun 2008 17:59:41 -0700 Subject: javascript_tag should only concat when block_given? --- actionpack/test/template/javascript_helper_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index f136f56777..4924074c3e 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -82,8 +82,12 @@ class JavaScriptHelperTest < ActionView::TestCase end def test_javascript_tag + @output_buffer = 'foo' + assert_dom_equal "", javascript_tag("alert('hello')") + + assert_equal 'foo', @output_buffer, 'javascript_tag without a block should not concat to @output_buffer' end def test_javascript_tag_with_options -- cgit v1.2.3