Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #15712 from zuhao/refactor_actionview_javascript_h…

…elper_test

Avoid hard-coded value in test setup and teardown.
  • Loading branch information...
commit 534e1e1f53c77430c7e169661da28d6e9c1927ce 2 parents a041107 + 0da1c80
@senny senny authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionview/test/template/javascript_helper_test.rb
View
6 actionview/test/template/javascript_helper_test.rb
@@ -12,14 +12,14 @@ def update_details(details)
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
Please sign in to comment.
Something went wrong with that request. Please try again.