aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorZuhao Wan <wanzuhao@gmail.com>2014-06-14 16:12:44 +0800
committerZuhao Wan <wanzuhao@gmail.com>2014-06-14 16:12:44 +0800
commit0da1c80a99fd6552c2f1683b2c41386f3493a500 (patch)
treed07ff00e293cba2ba324444a6756abd28e2a32c3 /actionview
parentee4e86fa4bb6ab0406127e2708e9c3db346ba314 (diff)
downloadrails-0da1c80a99fd6552c2f1683b2c41386f3493a500.tar.gz
rails-0da1c80a99fd6552c2f1683b2c41386f3493a500.tar.bz2
rails-0da1c80a99fd6552c2f1683b2c41386f3493a500.zip
Avoid hard-coded value in test setup and teardown.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/javascript_helper_test.rb6
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