On Sun, Jun 16, 2002 at 08:28:26PM +0100, Adrian Howard wrote:
> >Now, the way I do this at the moment is have num_method_tests() walk up
> >the callstack until it finds a package that also isa Test::Class (in 
> >this
> >case Base::Test) and then assume that is the class containing the method
> >whose # tests it should alter.

What happens when you've got a subclass of a subclass of Test::Class, and
they're each overriding a method and adding a test?


> >While this works, it just seems a trifle evil. When I coded it my
> >thoughts went something like "Gosh. That's a greasy hack... must fix
> >that later". When later eventually came around the other solutions I
> >came up with seemed even worse.
> >
> >I just have a sneaking feeling that there's a more elegant (for some
> >definition of "elegant") way of handling changing the number of tests
> >for test methods that will cope with inheritance nicely.

Make no_plan the default?  Works for Test::Inline.


-- 
This sig file temporarily out of order.

Reply via email to