module MultibyteTestHelpers
Constants
- ASCII_STRING
- BYTE_STRING
- CACHE_DIR
- UNICODE_STRING
- UNIDATA_URL
Public Instance Methods
assert_equal_codepoints(expected, actual, message = nil)
click to toggle source
# File activesupport/test/multibyte_test_helpers.rb, line 38 def assert_equal_codepoints(expected, actual, message = nil) assert_equal(inspect_codepoints(expected), inspect_codepoints(actual), message) end
chars(str)
click to toggle source
# File activesupport/test/multibyte_test_helpers.rb, line 30 def chars(str) ActiveSupport::Multibyte::Chars.new(str) end
inspect_codepoints(str)
click to toggle source
# File activesupport/test/multibyte_test_helpers.rb, line 34 def inspect_codepoints(str) str.to_s.unpack("U*").map { |cp| cp.to_s(16) }.join(" ") end