diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-01-25 10:02:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-25 10:02:11 +0000 |
commit | c5ec32727acede2cd290af240a2bc8e05a5c3478 (patch) | |
tree | 74ce6c905ddef58fba93ab4b6dfeae70675dc33c | |
parent | ed7a3cde67cfb7a46c3b674d7f9cb65fc9340ffd (diff) | |
parent | f7950b480c0acf7fdc7be948a58dabbefc105855 (diff) | |
download | rails-c5ec32727acede2cd290af240a2bc8e05a5c3478.tar.gz rails-c5ec32727acede2cd290af240a2bc8e05a5c3478.tar.bz2 rails-c5ec32727acede2cd290af240a2bc8e05a5c3478.zip |
Merge pull request #27796 from yui-knk/keep_separator_was
Keep the value of `$,` and restore it
-rw-r--r-- | actionview/test/template/output_safety_helper_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/test/template/output_safety_helper_test.rb b/actionview/test/template/output_safety_helper_test.rb index 0f3288130b..263c25ab49 100644 --- a/actionview/test/template/output_safety_helper_test.rb +++ b/actionview/test/template/output_safety_helper_test.rb @@ -94,12 +94,13 @@ class OutputSafetyHelperTest < ActionView::TestCase end test "to_sentence is not affected by $," do + separator_was = $, $, = "|" begin assert_equal "one and two", to_sentence(["one", "two"]) assert_equal "one, two, and three", to_sentence(["one", "two", "three"]) ensure - $, = nil + $, = separator_was end end end |