From 17e7f7d26d0d60bf592af6c5e2f2e8de2e40a7c6 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Mon, 20 Jan 2025 16:16:00 +1100 Subject: [PATCH] Small linting fix --- spec/models/spree/order_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/models/spree/order_spec.rb b/spec/models/spree/order_spec.rb index f10c1f4f80..3b2bcf1735 100644 --- a/spec/models/spree/order_spec.rb +++ b/spec/models/spree/order_spec.rb @@ -280,17 +280,17 @@ RSpec.describe Spree::Order do end end - context "#process_payments!" do + describe "#process_payments!" do let(:payment) { build(:payment) } before { allow(order).to receive_messages pending_payments: [payment], total: 10 } - it "should return false if no pending_payments available" do + it "returns false if no pending_payments available" do allow(order).to receive_messages pending_payments: [] expect(order.process_payments!).to be_falsy end context "when the processing is sucessful" do - it "should process the payments" do + it "processes the payments" do expect(payment).to receive(:process!) expect(order.process_payments!).to be_truthy end @@ -299,12 +299,12 @@ RSpec.describe Spree::Order do context "when a payment raises a GatewayError" do before { expect(payment).to receive(:process!).and_raise(Spree::Core::GatewayError) } - it "should return true when configured to allow checkout on gateway failures" do + it "returns true when configured to allow checkout on gateway failures" do Spree::Config.set allow_checkout_on_gateway_error: true expect(order.process_payments!).to be_truthy end - it "should return false when not configured to allow checkout on gateway failures" do + it "returns false when not configured to allow checkout on gateway failures" do Spree::Config.set allow_checkout_on_gateway_error: false expect(order.process_payments!).to be_falsy end