Fix: Next performing time should be related to last performing time

This commit is contained in:
Dzmitry Plashchynski
2015-03-04 18:46:44 +02:00
parent 828488a6bc
commit 78fa0f9dae
3 changed files with 11 additions and 3 deletions
+5
View File
@@ -30,6 +30,11 @@ describe Crono::Period do
@period = Crono::Period.new(2.day, at: 1)
}.to raise_error("Unknown 'at' format")
end
it "should return time in relation to last time" do
@period = Crono::Period.new(2.day)
expect(@period.next(since: 1.day.ago)).to be_eql(1.day.from_now)
end
end
end
end