diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 15:15:48 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 15:15:48 +0000 |
commit | 8c5b60eb22d6d661e87992a65d54e3a5bc0aeed4 (patch) | |
tree | 7905b284cb5b3d62c17ad8a939e339621a498a2c /spec/ruby/library/date/next_day_spec.rb | |
parent | 6530b14cee76e2512424d225e64d3c61dd1f6511 (diff) |
Update to ruby/spec@a6b8805
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 |