mirror of
https://github.com/plashchynski/crono.git
synced 2026-07-12 15:52:48 +02:00
Add basic Period class
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
require "spec_helper"
|
||||
|
||||
describe Periodicity::Period do
|
||||
around(:each) do |example|
|
||||
Timecop.freeze do
|
||||
example.run
|
||||
end
|
||||
end
|
||||
|
||||
describe "#next" do
|
||||
context "in daily basis" do
|
||||
it "should return the time 2 days from now" do
|
||||
@period = Periodicity::Period.new(2.day)
|
||||
expect(@period.next).to be_eql(2.day.from_now)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user