spec/moip2/response_spec.rb in moip2-1.0.0 vs spec/moip2/response_spec.rb in moip2-1.1.0

- old
+ new

@@ -13,13 +13,11 @@ end end describe "#success?" do let(:success_response) do - double("Success Response").tap do |success_response| - allow(success_response).to receive(:code).and_return(200) - end + double("Success Response", code: 200) end let(:response) { described_class.new(success_response, parsed_json) } it "returns true when response code == 2xx" do @@ -27,12 +25,10 @@ end end describe "#client_error?" do let(:error_response) do - double("Error Response").tap do |error_response| - allow(error_response).to receive(:code).and_return(400) - end + double("Error Response", code: 400) end let(:response) { described_class.new(error_response, {}) } it "returns false when response code == 4xx" do