Devel::Cover recommendations... or maybe not?
David Cantrell
david at cantrell.org.uk
Mon Mar 19 12:47:10 GMT 2007
On Sat, Mar 17, 2007 at 08:40:39PM +0000, Adrian Howard wrote:
> I think you want something like...
>
> use Test::MockObject;
> my $mock = Test::MockObject->new->
> mock( randommethod => sub { print "i like pie\n" } );
> $mock->fake_module( 'MockedModule' );
> $mock->fake_new( 'MockedModule' );
>
> MockedModule->new->randommethod;
Yeah, I eventually figgered it out by finding some other module on the
CPAN that used MockObject and copying what it did. I suppose I should
submit a documentation patch cos it's *really* not obvious.
--
David Cantrell | A machine for turning tea into grumpiness
We found no search results for "crotchet". Did you mean "crotch"?
More information about the london.pm
mailing list