aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2009-04-05 10:08:54 -0500
committerGeoff Buesing <gbuesing@gmail.com>2009-04-05 10:08:54 -0500
commitc00f2d25de640b8de1c8583474085f3836ee1768 (patch)
tree22f03541c018920e31a4865d827ea40f9763b200 /activesupport/test/core_ext/time_with_zone_test.rb
parent70de8e64e30092b2b1b77869e459b4868f5b9577 (diff)
downloadrails-c00f2d25de640b8de1c8583474085f3836ee1768.tar.gz
rails-c00f2d25de640b8de1c8583474085f3836ee1768.tar.bz2
rails-c00f2d25de640b8de1c8583474085f3836ee1768.zip
TimeWithZone.name returns 'Time', to further thwart type checking
Diffstat (limited to 'activesupport/test/core_ext/time_with_zone_test.rb')
-rw-r--r--activesupport/test/core_ext/time_with_zone_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb
index accfe51ed6..7be19e7900 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -317,6 +317,10 @@ class TimeWithZoneTest < Test::Unit::TestCase
assert @twz.kind_of?(Time)
assert @twz.is_a?(ActiveSupport::TimeWithZone)
end
+
+ def test_class_name
+ assert_equal 'Time', ActiveSupport::TimeWithZone.name
+ end
def test_method_missing_with_time_return_value
assert_instance_of ActiveSupport::TimeWithZone, @twz.months_since(1)