diff options
Diffstat (limited to 'spec/ruby/library/date/next_day_spec.rb')
-rw-r--r-- | spec/ruby/library/date/next_day_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/ruby/library/date/next_day_spec.rb b/spec/ruby/library/date/next_day_spec.rb index 1ccb4df257..795bfecf0a 100644 --- a/spec/ruby/library/date/next_day_spec.rb +++ b/spec/ruby/library/date/next_day_spec.rb @@ -3,8 +3,12 @@ require 'date' describe "Date#next_day" do it "returns the next day" do - d = Date.new(2000, 1, 5) - d1 = Date.new(2000, 1, 4).next_day - d1.should == d + d = Date.new(2000, 1, 4).next_day + d.should == Date.new(2000, 1, 5) + end + + it "returns three days later across months" do + d = Date.new(2000, 1, 30).next_day(3) + d.should == Date.new(2000, 2, 2) end end |