spec/rspec_em_spec.rb in amqp-spec-0.3.7 vs spec/rspec_em_spec.rb in amqp-spec-0.3.8

- old
+ new

@@ -10,11 +10,11 @@ it "should have timers" do start = Time.now em do EM.add_timer(0.5) { - (Time.now-start).should be_close(0.5, 0.1) + (Time.now-start).should be_within(0.1).of(0.5) done } end end @@ -23,20 +23,20 @@ expect { em(0.5) do EM.add_timer(1) { done } end }.to raise_error SpecTimeoutExceededError - (Time.now-start).should be_close(0.5, 0.1) + (Time.now-start).should be_within(0.1).of(0.5) end it "should be possible to set spec timeout as an option (amqp interface compatibility)" do start = Time.now expect { em(0.5) do EM.add_timer(1) { done } end }.to raise_error SpecTimeoutExceededError - (Time.now-start).should be_close(0.5, 0.1) + (Time.now-start).should be_within(0.1).of(0.5) end end describe EventMachine, " when testing with AMQP::Spec" do include AMQP::EMSpec \ No newline at end of file