Skip to content

Commit

Permalink
Merge pull request #6068 from mamhoff/fix-lint-problem
Browse files Browse the repository at this point in the history
Lint: Fix Money spec
  • Loading branch information
tvdeyen authored Jan 15, 2025
2 parents 68033cd + c3dd885 commit 332ed17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,6 @@ Lint/AmbiguousOperator:
- "bin/rails-application-template"
- "bin/rspec"

# Offense count: 1
Lint/BinaryOperatorWithIdenticalOperands:
Exclude:
- "core/spec/lib/spree/money_spec.rb"

# Offense count: 43
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Expand Down
3 changes: 2 additions & 1 deletion core/spec/models/spree/money_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@
describe "<=>" do
let(:usd_10) { Spree::Money.new(10, currency: "USD") }
let(:usd_20) { Spree::Money.new(20, currency: "USD") }
let(:other_usd_20) { Spree::Money.new(20, currency: "USD") }
let(:usd_30) { Spree::Money.new(30, currency: "USD") }

it "compares the two amounts" do
expect(usd_20 <=> usd_20).to eq 0
expect(usd_20 <=> other_usd_20).to eq 0
expect(usd_20 <=> usd_10).to be > 0
expect(usd_20 <=> usd_30).to be < 0
end
Expand Down

0 comments on commit 332ed17

Please sign in to comment.