On Wed, Jun 29, 2005 at 03:05:47PM -0400, Vsevolod (Simon) Ilyushchenko wrote:
> I've just stumbled upon Test::WWW::Mechanize and tried to use version 
> 1.05_02, but the very first test gave me the following error:

1.06 was just uploaded to CPAN today, but I don't think it fixes your 
problem.
http://search.cpan.org/dist/Test-WWW-Mechanize/

> 1) /opt/software/perl/lib//Test/WWW/Mechanize.pm:103 - frontPage(MCTests)
> You tried to run a test without a plan!  Gotta have a plan.
> 
> The Test::WWW::Mechanize class creates an instance of Test::Builder, 
> which requires that the plan() method is called on it before it can be 
> used. I got rid of the error by adding this:
> 
> my $Test = Test::Builder->new();
> $Test->plan('no_plan');
> 
> Am I supposed to use Test::WWW::Mechanize in a different way, though?

Yeah, though the documentation isn't explicit about it.  Test::WWW::Mechanize
apparently expects something else to set up the plan.  In all the tests
it uses Test::More to do this.


        use Test::More tests => 5;
        use Test::WWW::Mechanize;

        ...test as in the docs...

The docs should probably be made more explicit about this.


-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
You are wicked and wrong to have broken inside and peeked at the
implementation and then relied upon it.
        -- tchrist in <[EMAIL PROTECTED]>

Reply via email to