use Test::More 'no_plan'; use Test::MockObject; my $mock = Test::MockObject->new(); use_ok( 'A::Class' ); my $a = A::Class->new(); isa_ok( $a, 'A::Class' ); $mock->set_true( 'some_other_method' ) ->set_true( 'some_method_or_other' ); $a->some_method( $mock );