From 86dd2f32764ef3f141d9b24a47725b004fd4ac71 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Sat, 1 Dec 2012 15:41:06 -0500 Subject: ensure original encoding doesnt change --- activesupport/test/multibyte_chars_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 0088a06c34..2bf73291a2 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -47,7 +47,10 @@ class MultibyteCharsTest < ActiveSupport::TestCase end 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 -- cgit v1.2.3