1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Avoid hard-coded value in test setup and teardown.

This commit is contained in:
Zuhao Wan 2014-06-14 16:12:44 +08:00
parent ee4e86fa4b
commit 0da1c80a99

View file

@ -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