spec/scheduler_spec.rb in rufus-scheduler-3.0.9 vs spec/scheduler_spec.rb in rufus-scheduler-3.1.0
- old
+ new
@@ -600,10 +600,13 @@
it 'respects :times for repeat jobs' do
j0 = @scheduler.schedule_every '1m', :times => 10 do; end
- h = @scheduler.occurrences(Time.now + 4 * 60, Time.now + 16 * 60)
+ t0 = Time.parse((Time.now + 5 * 60).strftime('%Y-%m-%d %H:%M:01'))
+ t1 = t0 + 12 * 60 - 1
+
+ h = @scheduler.occurrences(t0, t1)
expect(h[j0].size).to eq(6)
end
end