On Mon, Oct 14, 2002 at 05:46:38PM -0400, Michael G Schwern wrote: > The reason I went with no_plan in Test::Inline was that unlike a dedicated > test script, a T::I test is cobbled together from a series of seperated > blocks of tests and it's more difficult than usual to count them all and add > them up. Adds another step to writing more tests. > Test::Class shares that cobbled together nature, but if it has a way to > specify them on a per-block basis, that will work without much trouble.
It does, and it's very nice. I like it a lot. Most of my tests are now of the format: sub test_foo : Test { is shift->do_something, 'expected value', "We can foo!"; } or, sometimes: sub test_bar : Test(2) { my $baz = shift->baz(10); isa_ok $baz, "Foo::Bar"; is $baz->value, 100, "baz gives correct value"; } This is a really neat way to specify the number of tests per block. > OTOH, my thinking recently is that the explicit plan has become obsolescent. > [1] This thinking makes me nervous, so I'm open to someone convincing me > otherwise. The biggest gain I see from it is preventing the accidental deletion of tests. A good revision control system will also catch that. But that's a whole nother story. Tony