diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 3557c11748..f9891c9358 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -21,4 +21,9 @@ class DateExtCalculationsTest < Test::Unit::TestCase def test_to_date assert_equal Date.new(2005, 2, 21), Date.new(2005, 2, 21).to_date end + + def test_change + assert_equal Date.new(2005, 2, 21), Date.new(2005, 2, 11).change(:day => 21) + assert_equal Date.new(2007, 5, 11), Date.new(2005, 2, 11).change(:year => 2007, :month => 5) + end end |