Skip to content

Specifying a negative receive expectation could be considered to break respond_to?

gitlab-qa-bot requested to merge issue_with_receive_and_respond_to into master

Created by: JonRowe

Specifying a negative receive expectation (expect(...).to_not receive(:blah)) could be considered to break respond_to?, as reported via twitter:

screen shot 2014-08-21 at 17 00 37

I'm on the fence by this, it's slightly surprising but not unexpected given a knowledge of the internals, the fix is complicated because we can't just return false from respond_to? for negative expectations (that could be a lie).

Merge request reports