spec/integration/queue_declaration_spec.rb in amqp-0.8.0.rc8 vs spec/integration/queue_declaration_spec.rb in amqp-0.8.0.rc9

- old
+ new

@@ -14,10 +14,14 @@ amqp_before do @channel = AMQP::Channel.new end + after(:all) do + AMQP.cleanup_state + done(0.3) + end # # Examples # @@ -26,17 +30,17 @@ let(:name) { "a queue declared at #{Time.now.to_i}" } it "declares a new queue with that name" do queue = @channel.queue(name) queue.name.should == name - done + done(0.3) end it "caches that queue" do queue = @channel.queue(name) @channel.queue(name).object_id.should == queue.object_id - done + done(0.3) end end # context context "when queue name is passed on as an empty string" do it "uses server-assigned queue name" do @@ -66,11 +70,11 @@ it "should raise ruby exception" do expect { @channel.queue(name, different_options) }.to raise_error(AMQP::IncompatibleOptionsError) @queue.delete - done(0.2) + done(0.3) end end end context "when passive option is used" do @@ -81,11 +85,11 @@ original_queue = @channel.queue(name) queue = @channel.queue(name, :passive => true) queue.should == original_queue - done + done(0.3) end # it end context "and queue with given name DOES NOT exist" do it "raises an exception" do @@ -93,11 +97,11 @@ expect { exchange = @channel.queue("queue declared at #{Time.now.to_i}", :passive => true) }.to raise_error - done + done(0.3) end # it end # context end # context @@ -109,10 +113,10 @@ expect { @channel.queue("previously.declared.durable.queue", :durable => false) }.to raise_error(AMQP::IncompatibleOptionsError) - done + done(0.3) end # it end # context end # describe end # describe AMQP