Permalink
Browse files

Fix imprecise duration addition test. Closes #8516 [Geoff Buesing]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6906 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed May 30, 2007
1 parent ff6d2aa commit 962b12fb9f067dac6a5b0d440237628d0e1f2141
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/test/core_ext/numeric_ext_test.rb
@@ -48,10 +48,10 @@ def test_irregular_durations
end
def test_duration_addition
- assert_equal @now.advance(:days => 1, :months => 1), (1.day + 1.month).since(@now)
+ assert_equal @now.advance(:days => 1).advance(:months => 1), (1.day + 1.month).since(@now)
assert_equal @now.advance(:days => 7), (1.week + 5.seconds - 5.seconds).since(@now)
assert_equal @now.advance(:years => 2), (4.years - 2.years).since(@now)
- assert_equal @dtnow.advance(:days => 1, :months => 1), (1.day + 1.month).since(@dtnow)
+ assert_equal @dtnow.advance(:days => 1).advance(:months => 1), (1.day + 1.month).since(@dtnow)
assert_equal @dtnow.advance(:days => 7), (1.week + 5.seconds - 5.seconds).since(@dtnow)
assert_equal @dtnow.advance(:years => 2), (4.years - 2.years).since(@dtnow)
end

0 comments on commit 962b12f

Please sign in to comment.