Sha256: df1ef427180a7b499c9b1fb14ecd2f8fd8380d4c263753ecd7c2e7ef34ab6a30
Contents?: true
Size: 511 Bytes
Versions: 2
Compression:
Stored size: 511 Bytes
Contents
require "spec_helper" class TestJob def perform;end end describe Crono::Schedule do describe "#next" do it "should return next job in schedule" do @schedule = Crono::Schedule.new [ Crono::Period.new(3.day, at: "18:55"), Crono::Period.new(1.day, at: "15:30"), Crono::Period.new(7.day, at: "06:05") ].each { |period| @schedule.add(TestJob, period) } expect(@schedule.next).to be_eql([TestJob, 1.day.from_now.change(hour: 15, min: 30)]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crono-0.5.1 | spec/schedule_spec.rb |
crono-0.5.0 | spec/schedule_spec.rb |