spec/in_spec.rb in rufus-scheduler-2.0.8 vs spec/in_spec.rb in rufus-scheduler-2.0.9

- old
+ new

@@ -75,32 +75,42 @@ sleep 1.5 var.should == true end + it 'returns the new job' do + + r = @s.in '1s' do + end + + r.class.should == Rufus::Scheduler::InJob + end + it 'triggers [almost] immediately jobs in the past' do var = nil - @s.in -2 do + r = @s.in -2 do var = true end #wait_next_tick sleep 0.550 + r.class.should == Rufus::Scheduler::InJob var.should == true @s.jobs.should == {} end it 'does not trigger jobs in the past when :discard_past => true' do var = nil - @s.in -2, :discard_past => true do + r = @s.in -2, :discard_past => true do var = true end + r.should == nil var.should == nil @s.jobs.should == {} end it 'unschedules jobs' do