rspec/rspec-mocks — pull request #726 by myronmarston (2014-06-27 21:59:15+00:00)
Title: Add specs demonstrating problem with verified doubles and keyword args.

These specs fail:

```
Failures:

1) verifying doubles instance doubles when doubled class is loaded for a method that accepts a mix of optional keyword and positional args allows hash matchers like `hash_including` to be used in place of the keywords arg hash
Failure/Error: expect(o).to receive(:mixed_args_method).with(1, 2, hash_including(:optional_arg_1 => 1))
Wrong number of arguments. Expected 2, got 3.
# ./spec/rspec/mocks/verifying_double_spec.rb:263:in `block (5 levels) in '
# /Users/myron/code/rspec-dev/repos/rspec-core/exe/rspec:4:in `'

2) verifying doubles instance doubles when doubled class is loaded for a method that only accepts keyword args allows hash matchers like `hash_including` to be used in place of the keywords arg hash
Failure/Error: expect(o).to receive(:kw_args_method).with(hash_including(:required_arg => 1))
Missing required keyword arguments: required_arg
# ./spec/rspec/mocks/verifying_double_spec.rb:255:in `block (5 levels) in '
# /Users/myron/code/rspec-dev/repos/rspec-core/exe/rspec:4:in `'
```

The problem is that our method signature logic treats a `Hash` as keyword args but does not treat hash matchers the same:

https://github.com/rspec/rspec-support/blob/1e52a1ff545f9042fcc3c06d3febf2873defc4e6/lib/rspec/support/method_signature_verifier.rb#L61

Not sure what a good solution is yet. Bringing it up for discussion.

/cc @xaviershay