Skip to content

Commit

Permalink
Disable Rails/SkipsModelValidations in spec folder
Browse files Browse the repository at this point in the history
It's okay to skip model validation to setup a spec.
  • Loading branch information
JDutil committed Oct 24, 2019
1 parent 448c59a commit 24e59a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ Rails/DynamicFindBy:
- find_by_param
- find_by_param!

# It's okay to skip model validations to setup a spec.
Rails/SkipsModelValidations:
Exclude:
- '*/spec/**/*'

# We use a lot of
#
# expect {
Expand Down
1 change: 1 addition & 0 deletions core/spec/models/spree/order_updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def create_adjustment(label, amount)
amount: -500,
finalized: true,
label: 'Some other credit')

line_item.adjustments.each { |item| item.update_column(:eligible, true) }

order.recalculate
Expand Down

0 comments on commit 24e59a9

Please sign in to comment.