From 9d2f9f26e8c334f679e31ea5a598f863ac030b39 Mon Sep 17 00:00:00 2001 From: tadf Date: Mon, 29 Sep 2008 11:53:59 +0000 Subject: [PATCH] fixed previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/date/test_date_new.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/date/test_date_new.rb b/test/date/test_date_new.rb index 6c1e463474..14ff247294 100644 --- a/test/date/test_date_new.rb +++ b/test/date/test_date_new.rb @@ -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