diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-26 10:18:07 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-11-26 10:18:07 -0800 |
commit | 9030cdadff8c7c859ba404c1d67b55f0441cdbf5 (patch) | |
tree | 5dafbc0441171c17d1f0ae2cfce766787a9b71a9 /activesupport/test/core_ext/date_ext_test.rb | |
parent | ab854db6493bd684e9db1dc1d6461b11dfbb2e58 (diff) | |
parent | cd6c5677fb164fc13aa30ebdddd1450b68c66856 (diff) | |
download | rails-9030cdadff8c7c859ba404c1d67b55f0441cdbf5.tar.gz rails-9030cdadff8c7c859ba404c1d67b55f0441cdbf5.tar.bz2 rails-9030cdadff8c7c859ba404c1d67b55f0441cdbf5.zip |
Merge pull request #3764 from arunagw/test_sunday_monday
Tests added for monday and sunday
Diffstat (limited to 'activesupport/test/core_ext/date_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index b4f848cd44..462badfe46 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -57,6 +57,14 @@ class DateExtCalculationsTest < ActiveSupport::TestCase assert_equal Date.new(2005,11,28), Date.new(2005,12,04).beginning_of_week #sunday end + def test_monday + assert_equal Date.new(2005,11,28), Date.new(2005,11,28).monday + end + + def test_sunday + assert_equal Date.new(2008,3,2), Date.new(2008,3,02).sunday + end + def test_beginning_of_week_in_calendar_reform assert_equal Date.new(1582,10,1), Date.new(1582,10,15).beginning_of_week #friday end |