Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests added for monday and sunday #3764

Merged
merged 1 commit into from
Nov 26, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions activesupport/test/core_ext/date_ext_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ def test_beginning_of_week
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
Expand Down