From: Jim Weirich Date: 2008-09-25T14:59:15+09:00 Subject: [ruby-core:18878] Mini-Unit pass/fail detection I asked this question back in June and I think it got lost in the noise (and I didn't follow up either, sorry). Since mini-unit was just merged into Ruby 1.9, I'm asking again (with a bit more urgency). On Jun 24, 2008, at 10:55 AM, Jim Weirich wrote: > Is there a way to detect if a particular test has passed or failed > from within the teardown method? Flexmock tries to avoid reporting > an error during teardown if the test has already failed. Teardown > mock errors are usually of the form "You didn't call this method the > number of times you said you would". Failing the test because of > that will usually hide the REAL cause of the test failure. > > TestUnit has a :passed? method on the TestCase object. Replicating > that would make it easy, but we have hooks to do something custom as > well. -- -- Jim Weirich -- jim.weirich@gmail.com