method
hash_including
RSpec latest stable (1.3.1)
-
0 notes -
Class: Spec::Mocks::ArgumentMatchers
- 1.1.4
- 1.1.12
- 1.2.0 (0)
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
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.