aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-08-01 18:34:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-08-01 18:34:41 -0700
commita606727606cc0725a39748dd9d310b2b064e3ca7 (patch)
treebe6a576c37bee062433de27bc3e7f61714ce7b51 /activesupport/test
parentcdf60e46cc01e5f7b14e95a0b7d914516fcdcbc1 (diff)
downloadrails-a606727606cc0725a39748dd9d310b2b064e3ca7.tar.gz
rails-a606727606cc0725a39748dd9d310b2b064e3ca7.tar.bz2
rails-a606727606cc0725a39748dd9d310b2b064e3ca7.zip
Extract String#bytesize shim
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index a23d3f6fef..1005a7e7ad 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -345,3 +345,10 @@ class TestGetTextString < Test::Unit::TestCase
assert_raises(ArgumentError) { "%{name} %f" % [1.0, 2.0] }
end
end
+
+class StringBytesizeTest < Test::Unit::TestCase
+ def test_bytesize
+ assert_respond_to 'foo', :bytesize
+ assert_equal 3, 'foo'.bytesize
+ end
+end