spec/at_spec.rb in rufus-scheduler-2.0.13 vs spec/at_spec.rb in rufus-scheduler-2.0.14

- old
+ new

@@ -58,19 +58,33 @@ var.should == true @s.jobs.should == {} end - it 'unschedules' do + it 'unschedules (job_id)' do job = @s.at Time.now + 3 * 3600 do end - wait_next_tick + sleep 0.300 @s.jobs.size.should == 1 @s.unschedule(job.job_id) + + @s.jobs.size.should == 0 + end + + it 'unschedules (job)' do + + job = @s.at Time.now + 3 * 3600 do + end + + sleep 0.300 + + @s.jobs.size.should == 1 + + @s.unschedule(job) @s.jobs.size.should == 0 end it 'accepts tags for jobs' do