From a606727606cc0725a39748dd9d310b2b064e3ca7 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 1 Aug 2009 18:34:41 -0700 Subject: Extract String#bytesize shim --- activesupport/test/core_ext/string_ext_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport/test/core_ext') 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 -- cgit v1.2.3