summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-29 11:53:59 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-29 11:53:59 +0000
commit15b585277b0cc29fb92071cc84acb700850781d1 (patch)
treef043cfe0a9d1583f81f332a9a776d9171a02d13a /test
parent8e930e7ea2a9e5a84c78e3ea83299e0b02b073d5 (diff)
downloadruby-15b585277b0cc29fb92071cc84acb700850781d1.tar.gz
ruby-15b585277b0cc29fb92071cc84acb700850781d1.tar.xz
ruby-15b585277b0cc29fb92071cc84acb700850781d1.zip
fixed previous commit.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/date/test_date_new.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/date/test_date_new.rb b/test/date/test_date_new.rb
index 6c1e46347..14ff24729 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