develooper Front page | perl.qa | Postings from November 2007

Re: getting better harness output with Test::Class

From:
Jonathan Swartz
Date:
November 7, 2007 06:49
Subject:
Re: getting better harness output with Test::Class
I ended up going with this solution. Incidentally, it is runtests(),  
and I think the first 1; is unnecessary (at least it seems to be for  
me).

Thanks!
Jon

On Oct 26, 2007, at 10:39 AM, Tom Heady wrote:

> Jonathan Swartz wrote:
>> ...
>> I'd like to avoid actually running a single script per class, for  
>> efficiency reasons - i.e. I agree with Ovid and Adrian here:
>>     http://use.perl.org/~Ovid/journal/31172
>> ...
>
>
> I get around the problem described in that post thusly:
>
> foo.t:
> ------
> #!/usr/bin/perl
>
> foo::Test->Runtests;
>
> 1;
>
> package foo::Test;
>
> use base 'Test::Class';
>
> is ( $dog , $cat , 'does dog eq cat?' );
>
> 1;
>
> --------------------
> Tom




Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About