[mocha-developer] Test errors without verification

Zach Moazeni zach at elevatorup.com
Wed Jul 25 23:49:02 EDT 2007

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 mock expectation was to blame, the test's failure / error  
messages don't give enough info. I've had to resort to

def teardown

which just gets tedious.

I've created a patch against trunk v164 and included it below.


def test_something
     mock = mock("some mock")
     flunk # or fail

I'm expecting to get both the flunk / fail message AND the Mocha  
expectation failure.

It's a very minor change, but I'm interested in what you guys think,


More information about the mocha-developer mailing list