________________________________ From: Evgeny <evgeny.zis...@gmail.com>
> I actually put a link to the FAQ at the very first mail I sent. Oh, that's embarrassing :) > It does not address my questions, it gives examples that say > "we can't count tests ahead of time, its impossible". But I > just want you to change the approach from "ahead of time" into > "realtime" or something ... like all the other testing > frameworks do it. I'm sorry, but I simply do not believe "all the other testing frameworks" do this. That being said: There's a difference between behavior and intent: can_ok $account, 'customers'; for my $customer ($account->customers) { ok $customer->is_current, '... and it should only return current customers'; } How many tests is that? Just because your tests all passed doesn't mean that it's the correct number of tests. (What if that doesn't return all of the "current" customers?) Premature exits are also caught with plans. If you still want to calculate a plan on the fly: use Test::More 'defer_plan'; # run tests all_done($number_of_tests); Note that $number_of_tests is optional. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6