in reply to Mocking isa
Try Test::MockObject::Extends:
use Test::MockObject; use Test::MockObject::Extends; use Test::More 'no_plan'; use strict; Test::MockObject->fake_module( 'Foo' ); my $x = Test::MockObject::Extends->new( 'Foo' ); $x->mock( 'bar', sub { 2 } ); is( $x->isa('Foo'), 1 ); is( $x->bar('Foo'), 2 );
|
|---|