From: dblack@... Date: 2003-01-10T21:47:22+09:00 Subject: Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] Hi -- On Fri, 10 Jan 2003 nathaniel@NOSPAMtalbott.ws wrote: > dblack@candle.superlink.net wrote: > > > Could there be a way to hook or override the default test, so > > that one could relatively easily change the behavior? > > Sure, it's trivial, and that's really at the core of the matter: where > do you introduce the overhead? Do you introduce it for those who want a > failure whenever they have an empty TestCase? Or, do you introduce it > for those who want to keep empty TestCases around? I think it has to be > one or the other - one set of users will have a bit of extra work, and > the other group of users will be able to start working out of the box. > > To be honest, I still lean towards making the default to fail on an > empty TestCase. What's a failure? It's an invitation to implement. > What's an empty TestCase? It's an invitation to implement (as Dave > pointed out in ruby-talk:60964). If you want to silence the invitation, > you just add an empty test to match your empty test case. I think what I had in mind was a little different. Let's say every empty test actually runs the #no_test method. That means that this: def test_1 end and this: def test_1 no_test end are effectively the same. The idea would then be: by overriding #no_test, you could change the behavior, without having to change all the empty tests themselves. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav