diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 07:21:14 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 07:21:14 +0000 |
commit | 962b12fb9f067dac6a5b0d440237628d0e1f2141 (patch) | |
tree | 976db2554cbdfe0370a3d50aa7f45c0538cbd2b2 /activesupport | |
parent | ff6d2aae0a127bb99dcf9e7c4117b2cd0143c088 (diff) | |
download | rails-962b12fb9f067dac6a5b0d440237628d0e1f2141.tar.gz rails-962b12fb9f067dac6a5b0d440237628d0e1f2141.tar.bz2 rails-962b12fb9f067dac6a5b0d440237628d0e1f2141.zip |
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
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/numeric_ext_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index ba6a646fad..975b5d1283 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -48,10 +48,10 @@ class NumericExtTimeAndDateTimeTest < Test::Unit::TestCase 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 |