spec/unit/api_spec.rb in fake_sqs-0.1.0 vs spec/unit/api_spec.rb in fake_sqs-0.2.0

- old
+ new

@@ -10,21 +10,21 @@ { :options => @options, :params => params } end end -describe FakeSQS::API do +RSpec.describe FakeSQS::API do it "delegates actions to classes" do 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 => queues - response[:params].should eq :foo => "bar" + expect(response[:options]).to eq :queues => queues + expect(response[:params]).to eq :foo => "bar" end it "raises InvalidAction for unknown actions" do api = FakeSQS::API.new(:queues => []) @@ -35,17 +35,17 @@ end it "resets queues" do queues = double :queues api = FakeSQS::API.new(:queues => queues) - queues.should_receive(:reset) + expect(queues).to receive(:reset) api.reset end it "expires messages in queues" do queues = double :queues api = FakeSQS::API.new(:queues => queues) - queues.should_receive(:expire) + expect(queues).to receive(:expire) api.expire end end