<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Here's another one.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>spec:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>m = mock("blah")</DIV><DIV>m.should_receive(:foo).with(1)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>code:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>m.foo(2)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Failure message:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Mock 'blah' expected 'foo' once, but received it 0 times</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>------</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Twice now I've gotten this failure message and wasted time trying to understand why the method foo() was not being called despite all evidence suggesting that it was being called.  The problem is that rSpec is lying to me.  foo() is being called.  The parameter is not what's expected, but foo() is being called.  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm not sure how fancy you guys want to get with the failure messages, but more information is needed.  Maybe:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Mock 'blah' expected 'foo(1)' once, but received it 0 times</DIV><DIV>or</DIV><DIV>Mock 'blah' expected 'foo' once with 1, but received it 1 time with 2</DIV><DIV>or to avoid the problem printing unknown parameters</DIV><DIV>Mock 'blah' expected 'foo' with one parameter, but received it 1 time with the wrong parameter</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Perhaps existing mock frameworks already have elegant terminology that could be referenced.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'll submit an RFE as soon as I figure out how.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Micah Martin</DIV><DIV>8th Light, Inc.</DIV><DIV>www.8thlight.com</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>