aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/multibyte_chars_test.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2014-08-16 10:19:42 +0900
committerAkira Matsuda <ronnie@dio.jp>2014-08-16 10:23:50 +0900
commitcc9d1c52012cd9d7c3f55fd3fe4032080f83b4f2 (patch)
tree76209a11c0364b845179049a9e710c28a98b20f8 /activesupport/test/multibyte_chars_test.rb
parent5643cace2d39486829078b85dcac37bee34090f2 (diff)
downloadrails-cc9d1c52012cd9d7c3f55fd3fe4032080f83b4f2.tar.gz
rails-cc9d1c52012cd9d7c3f55fd3fe4032080f83b4f2.tar.bz2
rails-cc9d1c52012cd9d7c3f55fd3fe4032080f83b4f2.zip
Avoid mutating the constants in a test case
Diffstat (limited to 'activesupport/test/multibyte_chars_test.rb')
-rw-r--r--activesupport/test/multibyte_chars_test.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb
index 22954a5590..73f640e8e5 100644
--- a/activesupport/test/multibyte_chars_test.rb
+++ b/activesupport/test/multibyte_chars_test.rb
@@ -8,7 +8,7 @@ class MultibyteCharsTest < ActiveSupport::TestCase
def setup
@proxy_class = ActiveSupport::Multibyte::Chars
- @chars = @proxy_class.new UNICODE_STRING
+ @chars = @proxy_class.new UNICODE_STRING.dup
end
def test_wraps_the_original_string
@@ -50,8 +50,6 @@ class MultibyteCharsTest < ActiveSupport::TestCase
def test_methods_are_forwarded_to_wrapped_string_for_byte_strings
original_encoding = BYTE_STRING.encoding
assert_equal BYTE_STRING.length, BYTE_STRING.mb_chars.length
- ensure
- BYTE_STRING.force_encoding(original_encoding)
end
def test_forwarded_method_with_non_string_result_should_be_returned_vertabim