use Test::More qw(no_plan); use Test::MockObject; # use Roman; # <- i don't have Roman.pm installed my $roman = Test::MockObject->new(); $roman->set_true($_) for qw(roman isroman arabic); ok($roman->isroman('IV')); $roman->set_false('isroman'); ok($roman->isroman('42'));