aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-06 17:59:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-06 17:59:41 -0700
commite732a405ab7d0d04f8a254764970c9dcda988f01 (patch)
tree3a245fbccbde5601965e244f3d966f31287c43b1 /actionpack/test/template
parentfec0f0678bef93f98cf1204bb007d109bbe97c37 (diff)
downloadrails-e732a405ab7d0d04f8a254764970c9dcda988f01.tar.gz
rails-e732a405ab7d0d04f8a254764970c9dcda988f01.tar.bz2
rails-e732a405ab7d0d04f8a254764970c9dcda988f01.zip
javascript_tag should only concat when block_given?
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/javascript_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
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 "<script type=\"text/javascript\">\n//<![CDATA[\nalert('hello')\n//]]>\n</script>",
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