class CoreExtStringMultibyteTest

Constants

ASCII_STRING
EUC_JP_STRING
INVALID_UTF8_STRING
UTF8_STRING

Public Instance Methods

test_core_ext_adds_mb_chars() click to toggle source
# File activesupport/test/core_ext/string_ext_test.rb, line 652
def test_core_ext_adds_mb_chars
  assert_respond_to UTF8_STRING, :mb_chars
end
test_mb_chars_returns_instance_of_proxy_class() click to toggle source
# File activesupport/test/core_ext/string_ext_test.rb, line 663
def test_mb_chars_returns_instance_of_proxy_class
  assert_kind_of ActiveSupport::Multibyte.proxy_class, UTF8_STRING.mb_chars
end
test_string_should_recognize_utf8_strings() click to toggle source
# File activesupport/test/core_ext/string_ext_test.rb, line 656
def test_string_should_recognize_utf8_strings
  assert UTF8_STRING.is_utf8?
  assert ASCII_STRING.is_utf8?
  assert !EUC_JP_STRING.is_utf8?
  assert !INVALID_UTF8_STRING.is_utf8?
end