spec/timeout_spec.rb in rufus-scheduler-2.0.11 vs spec/timeout_spec.rb in rufus-scheduler-2.0.12

- old
+ new

@@ -3,11 +3,11 @@ # Specifying rufus-scheduler # # Sun May 3 15:44:28 JST 2009 # -require File.join(File.dirname(__FILE__), '/spec_base') +require 'spec_base' describe "#{SCHEDULER_CLASS} timeouts" do before(:each) do @@ -92,13 +92,13 @@ rescue Rufus::Scheduler::TimeOutError => e timeouts << (Time.now - start) end end - sleep 5 + sleep 5.5 timeouts.size.should == 3 - timeouts.each { |to| (to * 10).to_i.should == 16 } + timeouts.each { |to| to.should be_within(0.5).of(1.5) } end it 'points to their "parent" job' do @s.in '1s', :timeout => '3s', :job_id => 'nada' do