aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/javascript_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/javascript_helper_test.rb')
-rw-r--r--actionview/test/template/javascript_helper_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/actionview/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb
index 9f1535ef53..01ebc8cae1 100644
--- a/actionview/test/template/javascript_helper_test.rb
+++ b/actionview/test/template/javascript_helper_test.rb
@@ -1,4 +1,4 @@
-require 'abstract_unit'
+require "abstract_unit"
class JavaScriptHelperTest < ActionView::TestCase
tests ActionView::Helpers::JavaScriptHelper
@@ -16,7 +16,7 @@ class JavaScriptHelperTest < ActionView::TestCase
end
def test_escape_javascript
- assert_equal '', escape_javascript(nil)
+ assert_equal "", escape_javascript(nil)
assert_equal %(This \\"thing\\" is really\\n netos\\'), escape_javascript(%(This "thing" is really\n netos'))
assert_equal %(backslash\\\\test), escape_javascript( %(backslash\\test) )
assert_equal %(dont <\\/close> tags), escape_javascript(%(dont </close> tags))
@@ -36,19 +36,19 @@ class JavaScriptHelperTest < ActionView::TestCase
end
def test_javascript_tag
- self.output_buffer = 'foo'
+ self.output_buffer = "foo"
assert_dom_equal "<script>\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'
+ assert_equal "foo", output_buffer, "javascript_tag without a block should not concat to output_buffer"
end
# Setting the :extname option will control what extension (if any) is appended to the url for assets
def test_javascript_include_tag
- assert_dom_equal "<script src='/foo.js'></script>", javascript_include_tag('/foo')
- assert_dom_equal "<script src='/foo'></script>", javascript_include_tag('/foo', extname: false )
- assert_dom_equal "<script src='/foo.bar'></script>", javascript_include_tag('/foo', extname: '.bar' )
+ assert_dom_equal "<script src='/foo.js'></script>", javascript_include_tag("/foo")
+ assert_dom_equal "<script src='/foo'></script>", javascript_include_tag("/foo", extname: false )
+ assert_dom_equal "<script src='/foo.bar'></script>", javascript_include_tag("/foo", extname: ".bar" )
end
def test_javascript_tag_with_options