diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-06-14 11:09:33 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-06-14 11:09:33 +0200 |
commit | 534e1e1f53c77430c7e169661da28d6e9c1927ce (patch) | |
tree | 565d9777ce6d126c028a1e36b044453a76fe9a0c /actionview/test | |
parent | a041107bf50d42ca92d41c89355ba663d700af48 (diff) | |
parent | 0da1c80a99fd6552c2f1683b2c41386f3493a500 (diff) | |
download | rails-534e1e1f53c77430c7e169661da28d6e9c1927ce.tar.gz rails-534e1e1f53c77430c7e169661da28d6e9c1927ce.tar.bz2 rails-534e1e1f53c77430c7e169661da28d6e9c1927ce.zip |
Merge pull request #15712 from zuhao/refactor_actionview_javascript_helper_test
Avoid hard-coded value in test setup and teardown.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/javascript_helper_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/test/template/javascript_helper_test.rb b/actionview/test/template/javascript_helper_test.rb index 4703111741..9ba7f64ad1 100644 --- a/actionview/test/template/javascript_helper_test.rb +++ b/actionview/test/template/javascript_helper_test.rb @@ -12,14 +12,14 @@ class JavaScriptHelperTest < ActionView::TestCase yield if block_given? end - def setup - super + setup do + @old_escape_html_entities_in_json = ActiveSupport.escape_html_entities_in_json ActiveSupport.escape_html_entities_in_json = true @template = self end def teardown - ActiveSupport.escape_html_entities_in_json = false + ActiveSupport.escape_html_entities_in_json = @old_escape_html_entities_in_json end def test_escape_javascript |