spec/unit/berkshelf/api_client/connection_spec.rb in berkshelf-api-client-2.0.2 vs spec/unit/berkshelf/api_client/connection_spec.rb in berkshelf-api-client-3.0.0

- old
+ new

@@ -19,11 +19,11 @@ expect(remote).to be_a(Berkshelf::APIClient::RemoteCookbook) end end it "contains a item for each dependency" do - expect(subject).to have(3).items + expect(subject.size).to eq(3) expect(subject[0].name).to eql("ruby") expect(subject[0].version).to eql("1.2.3") expect(subject[1].name).to eql("ruby") expect(subject[1].version).to eql("2.0.0") expect(subject[2].name).to eql("elixir") @@ -54,10 +54,10 @@ end end context "when the connection to the service fails" do before do - instance.should_receive(:get).and_raise(Faraday::Error::ConnectionFailed.new(StandardError)) + expect(instance).to receive(:get).and_raise(Faraday::Error::ConnectionFailed.new(StandardError)) end it "raises a Berkshelf::APIClient::ServiceUnavaiable" do expect { subject }.to raise_error(Berkshelf::APIClient::ServiceUnavaiable) end