diff options
author | Manfred Stienstra <manfred@fngtps.com> | 2008-09-11 22:38:20 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-09-11 22:51:26 +0200 |
commit | babbc1580da9e4a23921ab68d47c7c0d2e8447da (patch) | |
tree | 5f84cc282530fc8510812c9ca2b75f32e93f348f /activesupport/test | |
parent | 923f4ecad202e45ef117d592053c8b86549eb9d7 (diff) | |
download | rails-babbc1580da9e4a23921ab68d47c7c0d2e8447da.tar.gz rails-babbc1580da9e4a23921ab68d47c7c0d2e8447da.tar.bz2 rails-babbc1580da9e4a23921ab68d47c7c0d2e8447da.zip |
Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars values.
- Adds String#acts_like_string?
- Adds Chars#acts_like_string?
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1029 state:committed]
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 6 | ||||
-rw-r--r-- | activesupport/test/multibyte_chars_test.rb | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index c9f959ef32..c0decf2c3f 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -201,3 +201,9 @@ class StringInflectionsTest < Test::Unit::TestCase end end end + +class StringBehaviourTest < Test::Unit::TestCase + def test_acts_like_string + assert 'Bambi'.acts_like_string? + end +end
\ No newline at end of file diff --git a/activesupport/test/multibyte_chars_test.rb b/activesupport/test/multibyte_chars_test.rb index 63cfadb7ec..a87309b038 100644 --- a/activesupport/test/multibyte_chars_test.rb +++ b/activesupport/test/multibyte_chars_test.rb @@ -167,6 +167,10 @@ class CharsTest < Test::Unit::TestCase assert_equal false, 'test'.chars.respond_to?(:a_method_that_doesnt_exist) end + def test_acts_like_string + assert 'Bambi'.chars.acts_like_string? + end + protected def with_kcode(kcode) |