Skip to content

Commit

Permalink
Replace spec's syntax to RSpec 3
Browse files Browse the repository at this point in the history
  • Loading branch information
sauloperez committed Jul 22, 2020
1 parent e673c78 commit 68903e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/models/spree/payment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 68903e7

Please sign in to comment.