1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #8393 from frodsan/fix_dependend_order_test_example

Ensure original encoding does not change in mb_chars test.
This commit is contained in:
Carlos Antonio da Silva 2012-12-03 16:19:37 -08:00
commit e1ce84b1a9

View file

@ -47,7 +47,10 @@ class MultibyteCharsTest < ActiveSupport::TestCase
end end
def test_methods_are_forwarded_to_wrapped_string_for_byte_strings 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 assert_equal BYTE_STRING.length, BYTE_STRING.mb_chars.length
ensure
BYTE_STRING.force_encoding(original_encoding)
end end
def test_forwarded_method_with_non_string_result_should_be_returned_vertabim def test_forwarded_method_with_non_string_result_should_be_returned_vertabim