diff options
author | Arun Agrawal <arunagw@gmail.com> | 2011-11-26 23:37:01 +0530 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2011-11-26 23:37:01 +0530 |
commit | cd6c5677fb164fc13aa30ebdddd1450b68c66856 (patch) | |
tree | 70a9d5d3a53d0a7b08107d21c1b39bc876d1ab1b /activesupport/test | |
parent | 80ac4dc6d0632937ccf61b38bc15fc2f6e27b18b (diff) | |
download | rails-cd6c5677fb164fc13aa30ebdddd1450b68c66856.tar.gz rails-cd6c5677fb164fc13aa30ebdddd1450b68c66856.tar.bz2 rails-cd6c5677fb164fc13aa30ebdddd1450b68c66856.zip |
Tests added for monday and sunday
Reference commits :
a8f2860d0e7db86c61bb70935006100b04667ab1
80ac4dc6d0632937ccf61b38bc15fc2f6e27b18b
Diffstat (limited to 'activesupport/test')
-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 |