diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 16:36:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 16:36:04 +0000 |
commit | e84deb71d2e8a2855aba01bf88a710c8ae5ab1dc (patch) | |
tree | 35887214f58d22b0281c4fed537fec2b049b9ce9 /activesupport/test | |
parent | aa20834222e829406bf45b133e6413bedf702229 (diff) | |
download | rails-e84deb71d2e8a2855aba01bf88a710c8ae5ab1dc.tar.gz rails-e84deb71d2e8a2855aba01bf88a710c8ae5ab1dc.tar.bz2 rails-e84deb71d2e8a2855aba01bf88a710c8ae5ab1dc.zip |
Fixed that Time.local(2005,12).months_since(1) would raise "ArgumentError: argument out of range" #1311 [jhahn@niveon.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_ext_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 7ae2062387..6bad622386 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -37,7 +37,9 @@ class TimeExtCalculationsTest < Test::Unit::TestCase def test_months_since assert_equal Time.local(2005,7,5,10), Time.local(2005,6,5,10,0,0).months_since(1) + assert_equal Time.local(2006,1,5,10), Time.local(2005,12,5,10,0,0).months_since(1) assert_equal Time.local(2005,12,5,10), Time.local(2005,6,5,10,0,0).months_since(6) + assert_equal Time.local(2006,6,5,10), Time.local(2005,12,5,10,0,0).months_since(6) assert_equal Time.local(2006,1,5,10), Time.local(2005,6,5,10,0,0).months_since(7) assert_equal Time.local(2006,6,5,10), Time.local(2005,6,5,10,0,0).months_since(12) assert_equal Time.local(2007,6,5,10), Time.local(2005,6,5,10,0,0).months_since(24) |