spec/job_spec.rb in rufus-scheduler-3.1.6 vs spec/job_spec.rb in rufus-scheduler-3.1.7

- old
+ new

@@ -174,9 +174,19 @@ sleep 1 expect(job.running?).to eq(true) expect(job.scheduled?).to eq(true) end + + it 'returns false if job is unscheduled' do + job = @scheduler.schedule_interval('0.1s') { sleep 0.1 } + job.unschedule + + sleep 0.3 + + expect(job.running?).to eq(false) + expect(job.scheduled?).to eq(false) + end end describe '#call' do it 'calls the job (like it were a proc)' do