From 06433b1be3692aea326be8a61e51ea7372f90b98 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 30 Oct 2020 15:59:57 +0000 Subject: [PATCH] Fix rubocop issue Layout/ExtraSpacing --- .rubocop_todo.yml | 8 -------- spec/models/spree/payment_spec.rb | 2 +- spec/requests/api/orders_spec.rb | 4 ++-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bb7d567f5d..71bfa819ea 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,14 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. -Layout/ExtraSpacing: - Exclude: - - 'spec/models/spree/payment_spec.rb' - - 'spec/requests/api/orders_spec.rb' - # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. diff --git a/spec/models/spree/payment_spec.rb b/spec/models/spree/payment_spec.rb index 2a96f78c61..e3cebf2c6b 100644 --- a/spec/models/spree/payment_spec.rb +++ b/spec/models/spree/payment_spec.rb @@ -181,7 +181,7 @@ describe Spree::Payment do context "when gateway does not match the environment" do it "should raise an exception" do gateway.stub :environment => "foo" - expect { payment.purchase! }.to raise_error(Spree::Core::GatewayError) + expect { payment.purchase! }.to raise_error(Spree::Core::GatewayError) end end diff --git a/spec/requests/api/orders_spec.rb b/spec/requests/api/orders_spec.rb index b282b4045a..7893cc3b1d 100644 --- a/spec/requests/api/orders_spec.rb +++ b/spec/requests/api/orders_spec.rb @@ -30,8 +30,8 @@ describe 'api/orders', type: :request do context "when there are four orders with different properties set" do let!(:order_dist_1) { create(:order_with_distributor, email: "specific_name@example.com") } let!(:order_dist_2) { create(:order_with_totals_and_distribution) } - let!(:order_dist_1_complete) { create(:order, distributor: order_dist_1.distributor, state: 'complete', completed_at: Time.zone.today - 7.days) } - let!(:order_dist_1_credit_owed) { create(:order, distributor: order_dist_1.distributor, payment_state: 'credit_owed', completed_at: Time.zone.today) } + let!(:order_dist_1_complete) { create(:order, distributor: order_dist_1.distributor, state: 'complete', completed_at: Time.zone.today - 7.days) } + let!(:order_dist_1_credit_owed) { create(:order, distributor: order_dist_1.distributor, payment_state: 'credit_owed', completed_at: Time.zone.today) } let(:user) { order_dist_1.distributor.owner } let(:'X-Spree-Token') do