aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/duration_test.rb1
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb8
-rw-r--r--activesupport/test/core_ext/time_with_zone_test.rb2
3 files changed, 5 insertions, 6 deletions
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
index 05f529dc7d..710c221fac 100644
--- a/activesupport/test/core_ext/duration_test.rb
+++ b/activesupport/test/core_ext/duration_test.rb
@@ -5,6 +5,7 @@ class DurationTest < ActiveSupport::TestCase
def test_is_a
d = 1.day
assert d.is_a?(ActiveSupport::Duration)
+ assert_kind_of ActiveSupport::Duration, d
assert_kind_of Numeric, d
assert_kind_of Fixnum, d
assert !d.is_a?(Hash)
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index ea21e445e2..759b0ddcd6 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -245,11 +245,9 @@ class CoreExtStringMultibyteTest < ActiveSupport::TestCase
assert_kind_of ActiveSupport::Multibyte.proxy_class, UNICODE_STRING.mb_chars
end
end
- end
-
- if RUBY_VERSION >= '1.9'
- def test_mb_chars_returns_string
- assert_kind_of String, UNICODE_STRING.mb_chars
+ else
+ def test_mb_chars_returns_instance_of_proxy_class
+ assert_kind_of ActiveSupport::Multibyte.proxy_class, UNICODE_STRING.mb_chars
end
end
end
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb
index 77b1893f77..2cf5bd6ea9 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -326,7 +326,7 @@ class TimeWithZoneTest < Test::Unit::TestCase
def test_is_a
assert_kind_of Time, @twz
assert_kind_of Time, @twz
- assert ActiveSupport::TimeWithZone, @twz
+ assert_kind_of ActiveSupport::TimeWithZone, @twz
end
def test_class_name