method

hash_including

Importance_1
RSpec latest stable (1.3.1) - 0 notes - 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.

Show source
Register or log in to add new notes.