spec/support/amqp.rb in cloudist-0.4.4 vs spec/support/amqp.rb in cloudist-0.5.0
- old
+ new
@@ -1,16 +1,16 @@
def stub_amqp!
- AMQP.stubs(:start)
+ AMQP.stub(:start)
mock_queue = mock("AMQP::Queue")
- mock_queue.stubs(:bind)
- mock_queue.stubs(:name).returns("test.queue")
-
+ mock_queue.stub(:bind)
+ mock_queue.stub(:name).and_return("test.queue")
+
mock_ex = mock("AMQP::Exchange")
- mock_ex.stubs(:name).returns("test.queue")
-
+ mock_ex.stub(:name).and_return("test.queue")
+
mock_channel = mock("AMQP::Channel")
- mock_channel.stubs(:prefetch).with(1)
- mock_channel.stubs(:queue).returns(mock_queue)
- mock_channel.stubs(:direct).returns(mock_ex)
-
- AMQP::Channel.stubs(:new).returns(mock_channel)
+ mock_channel.stub(:prefetch).with(1)
+ mock_channel.stub(:queue).and_return(mock_queue)
+ mock_channel.stub(:direct).and_return(mock_ex)
+
+ AMQP::Channel.stub(:new).and_return(mock_channel)
end