From: Gavin Sinclair Date: 2003-01-09T16:40:50+09:00 Subject: Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] On Thursday, January 9, 2003, 12:52:33 PM, Mike wrote: >> In my mind, there's nothing whatsoever wrong with an empty unit test. > I tend to agree with Gavin that an empty unit test shouldn't be flagged as a > failure. I use them for placeholders too. I'll add that in my last Ruby project, I actually wrote my own test running code so that each test class was run individually (instead of all test methods being thrown into a large soup and executed homogenously). The output was something like: ----- TestFroboz [normal Test::Unit output] ----- TestQuarkXP [normal Test::Unit output] etc. I think I made it optionally run the default way. Sometimes I want to see combined outputs (just for that reassuring "0 errors, 0 failures"), and other times I want to see the output separated. Motivations: - I know something's failing in one area but am ignoring that for now - I want to see how many tests are being performed in each class - I want a better breakdown of where things are happening The second motivation specified is the point of all this. I *know* that I don't have enough test coverage; this helps me find where coverage is low, without spitting "failures" at me. Of course, I consider some test methods critical; they have an automatic failure with the message "Not implemented". Summary: there are plenty of ways to manage your tests, and inventing failures when there was no code to fail seems to me to be a bad fit. Gavin