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:
parent
ee4e86fa4b
commit
0da1c80a99
1 changed files with 3 additions and 3 deletions
|
@ -12,14 +12,14 @@ class JavaScriptHelperTest < ActionView::TestCase
|
||||||
yield if block_given?
|
yield if block_given?
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup
|
setup do
|
||||||
super
|
@old_escape_html_entities_in_json = ActiveSupport.escape_html_entities_in_json
|
||||||
ActiveSupport.escape_html_entities_in_json = true
|
ActiveSupport.escape_html_entities_in_json = true
|
||||||
@template = self
|
@template = self
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
ActiveSupport.escape_html_entities_in_json = false
|
ActiveSupport.escape_html_entities_in_json = @old_escape_html_entities_in_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_escape_javascript
|
def test_escape_javascript
|
||||||
|
|
Loading…
Reference in a new issue