spec/unit/api_spec.rb in fake_sqs-0.0.9 vs spec/unit/api_spec.rb in fake_sqs-0.0.10
- old
+ new
@@ -13,14 +13,16 @@
end
describe FakeSQS::API do
it "delegates actions to classes" do
- api = FakeSQS::API.new(:queues => [])
+ queues = double :queues
+ allow(queues).to receive(:transaction).and_yield
+ api = FakeSQS::API.new(:queues => queues)
response = api.call("TheAction", {:foo => "bar"})
- response[:options].should eq :queues => []
+ response[:options].should eq :queues => queues
response[:params].should eq :foo => "bar"
end
it "raises InvalidAction for unknown actions" do
api = FakeSQS::API.new(:queues => [])