Skip to content

Commit

Permalink
Merge pull request #15712 from zuhao/refactor_actionview_javascript_h…
Browse files Browse the repository at this point in the history
…elper_test

Avoid hard-coded value in test setup and teardown.
  • Loading branch information
senny committed Jun 14, 2014
2 parents a041107 + 0da1c80 commit 534e1e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionview/test/template/javascript_helper_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 534e1e1

Please sign in to comment.