diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-27 23:12:07 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-27 23:12:07 +0000 |
commit | 77eb0a8493453773a4fda11320d889fae937ce89 (patch) | |
tree | af4e9b144f5b3306057ffc27da58172d962bbfbc /activesupport | |
parent | 2aed78d27016d3172e89f234e2d5a6552b3a493c (diff) | |
download | rails-77eb0a8493453773a4fda11320d889fae937ce89.tar.gz rails-77eb0a8493453773a4fda11320d889fae937ce89.tar.bz2 rails-77eb0a8493453773a4fda11320d889fae937ce89.zip |
Fix chained duration operation tests. Closes #8489 [Geoff Buesing]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/numeric_ext_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index a594d25805..402a255b51 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -56,8 +56,8 @@ class NumericExtTimeTest < Test::Unit::TestCase end def test_chaining_duration_operations - assert_equal @now.advance(:days => 2, :months => -3), @now + 2.days - 3.months - assert_equal @now.advance(:days => 1, :months => 2), @now + 1.day + 2.months + assert_equal @now.advance(:days => 2).advance(:months => -3), @now + 2.days - 3.months + assert_equal @now.advance(:days => 1).advance(:months => 2), @now + 1.day + 2.months end def test_duration_after_convertion_is_no_longer_accurate @@ -78,8 +78,8 @@ class NumericExtDateTest < Test::Unit::TestCase end def test_chaining_duration_operations - assert_equal @today.advance(:days => 2, :months => -3), @today + 2.days - 3.months - assert_equal @today.advance(:days => 1, :months => 2), @today + 1.day + 2.months + assert_equal @today.advance(:days => 2).advance(:months => -3), @today + 2.days - 3.months + assert_equal @today.advance(:days => 1).advance(:months => 2), @today + 1.day + 2.months end end |