mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-25 10:18:49 +02:00
Add basic Period class
This commit is contained in:
18
spec/period_spec.rb
Normal file
18
spec/period_spec.rb
Normal file
@@ -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