1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fixed previous commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-09-29 11:53:59 +00:00
parent 1ac57f70e8
commit 9d2f9f26e8

View file

@ -255,11 +255,12 @@ class TestDateNew < Test::Unit::TestCase
end
def test_today
z = Time.now
d = Date.today
t = Time.now
t2 = Time.utc(t.year, t.mon, t.mday)
t3 = Time.utc(d.year, d.mon, d.mday)
assert_in_delta(t2, t3, 10)
assert_in_delta(t2, t3, t - z + 2)
assert_equal(false, DateTime.respond_to?(:today))
end
@ -267,10 +268,11 @@ class TestDateNew < Test::Unit::TestCase
def test_now
assert_equal(false, Date.respond_to?(:now))
z = Time.now
d = DateTime.now
t = Time.now
t2 = Time.local(d.year, d.mon, d.mday, d.hour, d.min, d.sec)
assert_in_delta(t, t2, 10)
assert_in_delta(t, t2, t - z + 2)
end
end