summaryrefslogtreecommitdiff
path: root/test/date
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-07 15:08:42 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-07 15:08:42 +0000
commit2bf7d240b81e2886e961d2ee755909a4416eebb2 (patch)
tree6b0bdf1fba1b52c4a9281a03f265a71998a378f0 /test/date
parent84f677d2f38f596f71d6aea54ba2da68f4f60855 (diff)
* lib/date.rb (today,now): should produce own instances.
[ruby-talk:317020] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date')
-rw-r--r--test/date/test_date.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/date/test_date.rb b/test/date/test_date.rb
index 3ae2263..8cadb23 100644
--- a/test/date/test_date.rb
+++ b/test/date/test_date.rb
@@ -36,6 +36,11 @@ class TestDate < Test::Unit::TestCase
dt = DateTimeSub.new
assert_instance_of(DateSub, d)
+ assert_instance_of(DateTimeSub, dt)
+
+ assert_instance_of(DateSub, DateSub.today)
+ assert_instance_of(DateTimeSub, DateTimeSub.now)
+
assert_equal('#<DateSub: -1/2,0,2299161>', d.inspect)
assert_equal('-4712-01-01', d.to_s)
assert_equal('-4712-01-01T00:00:00+00:00', dt.to_s)