Skip to content

Commit

Permalink
Fix a deep comparison issue in spec file
Browse files Browse the repository at this point in the history
Not entirely sure what's going on here, but since this fixes the failure
I'm banking on a deep comparison mismatch when the hash gets recreated.
Only creating one hash works around it.
  • Loading branch information
bhornseth committed Oct 11, 2022
1 parent d16d326 commit 53b1c0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/unit/spark_api/models/defaultable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ class TestClass < Base
end

it "passes options to 'default'" do
expect(TestClass).to receive(:default).with(foo: true)
TestClass.find(TestClass::DEFAULT_ID, foo: true)
args = { foo: true }
expect(TestClass).to receive(:default).with(args)
TestClass.find(TestClass::DEFAULT_ID, args)
end

it "calls Finders.find when given a normal id" do
Expand Down

0 comments on commit 53b1c0b

Please sign in to comment.