rspec/rspec-mocks — pull request #548 by myronmarston (2014-01-29 18:38:55+00:00)
Title: Improve method signature / argument validation

This is some further changes on top of #543.

I've done a bit of refactoring, renamed some things to reflect new realities (e.g. it's not just an arity check anymore), and fixed a couple of bugs I noticed when playing around with kw args.

Things I still want to consider doing:

- [ ] There's an old arity check for [and_yield](https://github.com/rspec/rspec-mocks/blob/f5364ac26406d8eb21691879879851d06bee800e/lib/rspec/mocks/message_expectation.rb#L558-L560) that should be updated to use this.
- [ ] I'd still like to consider raising an error message with _all_ of the problems rather than just the first discovered problem. I think this is simpler with the current code structure than when we discussed it before.o

@xaviershay, the commits are pretty self-contained and since there are a bunch of changes made for different reasons (generally explained in the commit message), you may want to review this commit-by-commit.