Hello, Given receiver has a method *foo(first_name:, last_name:)*
We could check for calls to that with: Use a *hash_including* Matcher: expect(receiver).to receive(:foo).with(hash_including(first_name: "Alan")) Mention *every keyword argument* in the expectation: expect(receiver).to receive(:foo).with(first_name: "Alan", last_name: anything) Is there a way to match "just a few keywords"? Weak ideas: - Perhaps locally aliasing hash_including to keywords_including Anyone got anything else? Is this a real wart, or is it something that'll be invisible to the reader after they've fully entered Ruby 3? Thanks for considering this very minor issue! /Olle -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CAKSmg_R_70c-M07Fhz4pQ_4sO-sTeE%3DWEJvpj%2Bnu%2BM0%3DYEG9EA%40mail.gmail.com.