From 68903e731b554e4119c08caa85d7a97b9d68338c Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 22 Jul 2020 11:08:34 +0200 Subject: [PATCH] Replace spec's syntax to RSpec 3 --- spec/models/spree/payment_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/spree/payment_spec.rb b/spec/models/spree/payment_spec.rb index c190d701d02..8c41f1963fe 100644 --- a/spec/models/spree/payment_spec.rb +++ b/spec/models/spree/payment_spec.rb @@ -387,13 +387,13 @@ context "when response is successful" do it "should create an offsetting payment" do - Spree::Payment.should_receive(:create!) + expect(Spree::Payment).to receive(:create!) payment.credit! end it "resulting payment should have correct values" do - payment.order.stub :outstanding_balance => 100 - payment.stub :credit_allowed => 10 + allow(payment.order).to receive(:outstanding_balance) { 100 } + allow(payment).to receive(:credit_allowed) { 10 } offsetting_payment = payment.credit! expect(offsetting_payment.amount.to_f).to eq(-10)