Skip to content

Commit

Permalink
Handle rspec-mocks 3.10.3 change with "with" syntax
Browse files Browse the repository at this point in the history
Passing hash and keyword values as function parameters in tests
fail when using rspec-mocks >= v3.10.3.

See rspec/rspec-mocks#1460
for more information.
  • Loading branch information
deborahchua committed Feb 9, 2023
1 parent aa10872 commit f85ddb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/feedback_export_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@

it "uses the scope from the model with the correct parameters" do
contact = double("AnonymousContact")
expect(AnonymousContact).to receive(:for_query_parameters).with(
expect(AnonymousContact).to receive(:for_query_parameters).with({
from: Date.new(2015, 4),
to: Date.new(2015, 5),
path_prefixes: ["/"],
organisation_slug: "hm-revenue-customs",
document_type: "smart_answer",
).and_return(double("scope", most_recent_last: [contact]))
}).and_return(double("scope", most_recent_last: [contact]))

expect(subject).to eq [contact]
end
Expand Down

0 comments on commit f85ddb5

Please sign in to comment.