-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1195 from herwinw/date_mon
Add specs for Date#mon
- Loading branch information
Showing
3 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
require_relative '../../spec_helper' | ||
require_relative 'shared/month' | ||
require 'date' | ||
|
||
describe "Date#mon" do | ||
it "needs to be reviewed for spec completeness" | ||
it_behaves_like :date_month, :mon | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
require_relative '../../spec_helper' | ||
require_relative 'shared/month' | ||
require 'date' | ||
|
||
describe "Date#month" do | ||
it "returns the month" do | ||
m = Date.new(2000, 7, 1).month | ||
m.should == 7 | ||
end | ||
it_behaves_like :date_month, :month | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
describe :date_month, shared: true do | ||
it "returns the month" do | ||
m = Date.new(2000, 7, 1).send(@method) | ||
m.should == 7 | ||
end | ||
end |