[mocha-developer] Test errors without verification
zach.lists at gmail.com
Thu Aug 2 23:21:24 EDT 2007
If anyone else feels these pains, I've written a monkey patch (ripped
off from Hardmock) that will ensure both the verification and the
user's teardown at http://www.simplechatter.com/2007/8/3/mocha-and-
Mostly posting for archiving purposes.
Thanks for the great mocking library, guys.
On Jul 26, 2007, at 5:12 AM, James Mead wrote:
> Hi Zach,
> On 26/07/07, Zach Moazeni <zach.lists at gmail.com> wrote:
>> I'm not sure if this is by design, but I've stumbled across this a
>> few times trying to debug my own tests. If an assertion fails the
>> test, and a missing mock expectation was to blame, the test's
>> failure / error messages don't give enough info.
> This is by design. In my mind a verification failure is analogous
> to an
> assertion failure. Test::Unit does not report multiple assertion
> per test, but reports the first failure. Failing fast seems like
> the right
> thing to do. At that point all bets are off and there is no point in
> I wonder if the pain you are feeling is because you have too many
> and/or expectations in each test. You might find the following article
> Thanks for taking the time to put a patch together, but at this
> stage I'm
> not convinced it's the way to go.
> mocha-developer mailing list
> mocha-developer at rubyforge.org
More information about the mocha-developer