aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-28 14:48:04 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-28 14:48:04 -0800
commite38d310912a610ffe8a0944a533bfb9e5950f3a5 (patch)
tree00c6d3415b4a90e3700a21bf73aafb88cc7e9936 /activesupport/test
parente9df07870fc16eaefbff60e0e80921489eefcd91 (diff)
parentbd852603a18a3a9d20597382a97f9b0f5bb0fc94 (diff)
downloadrails-e38d310912a610ffe8a0944a533bfb9e5950f3a5.tar.gz
rails-e38d310912a610ffe8a0944a533bfb9e5950f3a5.tar.bz2
rails-e38d310912a610ffe8a0944a533bfb9e5950f3a5.zip
Merge pull request #8261 from steveklabnik/fix_mb_chars
Simplify String#mb_chars and fix documentation.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/multibyte_chars_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb
index ef289692bc..0088a06c34 100644
--- a/activesupport/test/multibyte_chars_test.rb
+++ b/activesupport/test/multibyte_chars_test.rb
@@ -47,7 +47,7 @@ class MultibyteCharsTest < ActiveSupport::TestCase
end
def test_methods_are_forwarded_to_wrapped_string_for_byte_strings
- assert_equal BYTE_STRING.class, BYTE_STRING.mb_chars.class
+ assert_equal BYTE_STRING.length, BYTE_STRING.mb_chars.length
end
def test_forwarded_method_with_non_string_result_should_be_returned_vertabim
@@ -673,6 +673,9 @@ class MultibyteCharsExtrasTest < ActiveSupport::TestCase
assert_equal "𥤤", chars(byte_string).tidy_bytes(true)
end
+ def test_class_is_not_forwarded
+ assert_equal BYTE_STRING.dup.mb_chars.class, ActiveSupport::Multibyte::Chars
+ end
private