From: Gavin Sinclair Date: 2003-01-05T07:09:24+09:00 Subject: Re: testunit 0.1.6 problems On Sunday, January 5, 2003, 2:46:04 AM, nathaniel wrote: > If you tell Test::Unit to run something, and there are no tests to run > in what you told it to run, it will give you an error. If you add a test > to TC_Foo, it should start passing. > I'm curious to know what others think of this change/feature. Does it > make sense? Are there reasons to want a TestCase that has no test > methods? I added the error at someone's request, but I'm willing to take > it out again if there are compelling reasons to do so. A failure, in a test unit sense, means strictly (to me) that an assertion has failed, and an error means strictly that an uncaught exception was detected. I see no need to mark the lack of tests with a failure: one. it's misleading; and two, it's inconvenient. I haven't done it myself, but I would do this: decide my tests for a certain class are no longer valid, delete them, but leave the shell (the TestCase) there so I can create some new ones in the future. I suggest emitting a warning in hte event of an empty TestCase. Perhaps it could be (optionally) made a failure with a method like TestCase#assert_tests_exist=, or some other approach. Gavin