I've written a module to make it easier to do very strict unit testing. It
lets you fake an existing interface somewhat more easily. For example, if
you're testing a web app, you can mock up CGI.pm instead of having to specify
query information manually.
This is early code and the interface is
At Sun, 28 Apr 2002 01:06:18 -0700,
chromatic wrote:
> I've written a module to make it easier to do very strict unit testing. It
> lets you fake an existing interface somewhat more easily. For example, if
> you're testing a web app, you can mock up CGI.pm instead of having to specify
> query i
-BEGIN PGP SIGNED MESSAGE-
MOIN,
On 28-Apr-02 Tatsuhiko Miyagawa carved into stone:
> At Sun, 28 Apr 2002 01:06:18 -0700,
> chromatic wrote:
>
>> I've written a module to make it easier to do very strict unit testing.
>> It
>> lets you fake an existing interface somewhat more easily.
Run this little script:
use Test::More tests => 10;
use strict;
my $pid;
if ($pid = fork)
{
wait;
ok(1) for 1..10;
}
else
{
exit;
}
And note the annoying "# No tests run!" message that gets printed before
the first "ok" message.
I can't think of any really
On Sun, Apr 28, 2002 at 02:23:11PM -0500, Dave Rolsky wrote:
> I can't think of any really elegant solutions other than adding something
> like:
>
> Test::Builder->reset
>
> and calling that in child processes.
Test::Builder->no_ending(1);
use Test::More tests => 10;
my $TB = Test::M
On Sunday 28 April 2002 02:00, Tatsuhiko Miyagawa wrote:
> Here's a patch
> * pass tests in 5.005_03
> * can() should return subref instead of just 1
Thanks, applied! I also added a test to prevent that can() thinko from
reoccurring.
> Seems interesting. But I prefer a direct way to define M