in reply to Re^2: Test::Unit extensions going in the right direction?
in thread Test::Unit extensions going in the right direction?
You have some excellent points. This, incidentally, is one of the reasons why I was never happy that xUnit style tests end on the first assertion failure within an individual test. With Test::More, those individual assertions are called "tests" and they don't stop running should one test fail. Of course, that does mean it's more likely that one will have a cascading series of failures with possibly unpredictable results.
What I typically do is have code at the top of the test which sets up my environment (not ENV) and if I really need custom cleanup code, I can just set a callback for the &teardown. Still, it sounds like your method might be a bit more natural than what I am used to doing.
Cheers,
Ovid
New address of my CGI Course.
|
|---|