diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/multibyte_chars_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 63aff6eb99..d8766af3b8 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -151,6 +151,13 @@ class CharsTest < Test::Unit::TestCase end end + def test_duck_typing + assert_equal true, 'test'.chars.respond_to?(:strip) + assert_equal true, 'test'.chars.respond_to?(:normalize) + assert_equal true, 'test'.chars.respond_to?(:normalize!) + assert_equal false, 'test'.chars.respond_to?(:a_method_that_doesnt_exist) + end + protected def with_kcode(kcode) |