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?
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue