rspec/rspec-mocks — pull request #364 by timcowlishaw (2013-07-12 15:55:07+00:00)
Title: Make have_received complain if passed a block

I rather stupidly assumed I could use a block passed to have_received to make
assertions about the arguments passed in a method call, in the same way that is
possible with the 'receive' matcher. Ordinarily I wouldn't think such a mistake
would warrant being guarded against in the test library itself, however, in this
case the test silently passes, rather than erroring out. This patch makes
have_received raise an exception if passed a block argument to make it clear
that matching against arguments to the method call in this way is not possible.