Fix rubocop issue Layout/ArgumentAlignment

This commit is contained in:
Luis Ramos
2020-10-30 15:55:53 +00:00
parent ad14f7f9b0
commit 3e6e338e3d
3 changed files with 14 additions and 23 deletions

View File

@@ -6,15 +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: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Exclude:
- 'spec/models/spree/address_spec.rb'
- 'spec/models/spree/order/checkout_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith.

View File

@@ -7,18 +7,18 @@ describe Spree::Address do
it "creates a copy of the address with the exception of the id, updated_at and created_at attributes" do
state = build_stubbed(:state)
original = build_stubbed(:address,
address1: 'address1',
address2: 'address2',
alternative_phone: 'alternative_phone',
city: 'city',
country: state.country,
firstname: 'firstname',
lastname: 'lastname',
company: 'company',
phone: 'phone',
state_id: state.id,
state_name: state.name,
zipcode: 'zip_code')
address1: 'address1',
address2: 'address2',
alternative_phone: 'alternative_phone',
city: 'city',
country: state.country,
firstname: 'firstname',
lastname: 'lastname',
company: 'company',
phone: 'phone',
state_id: state.id,
state_name: state.name,
zipcode: 'zip_code')
cloned = original.clone

View File

@@ -60,7 +60,7 @@ describe Spree::Order::Checkout do
it "cannot transition to address without any line items" do
expect(order.line_items).to be_blank
expect(lambda { order.next! }).to raise_error(StateMachine::InvalidTransition,
/#{Spree.t(:there_are_no_items_for_this_order)}/)
/#{Spree.t(:there_are_no_items_for_this_order)}/)
end
context "from address" do
@@ -83,7 +83,7 @@ describe Spree::Order::Checkout do
specify do
transition = lambda { order.next! }
expect(transition).to raise_error(StateMachine::InvalidTransition,
/#{Spree.t(:items_cannot_be_shipped)}/)
/#{Spree.t(:items_cannot_be_shipped)}/)
end
end
end