method
hash_including
1.3.0 -
Show latest stable
- Class:
Spec::Mocks::ArgumentMatchers
hash_including(*args)public
:call-seq:
object.should_receive(:message).with(hash_including(:key => val)) object.should_receive(:message).with(hash_including(:key)) object.should_receive(:message).with(hash_including(:key, :key2 => val2))
Passes if the argument is a hash that includes the specified key(s) or key/value pairs. If the hash includes other keys, it will still pass.