I'm running into an issue that is probably best illustrated with code, below. I'm not sure if I'm just using the class wrong, or if this is a bug in the Mock::Quick package:
#!/usr/bin/env perl
use Mock::Quick;
test1();
test2();
sub test1 {
my $control = qimplement 'Foo' => (
bar => sub { say STDOUT 'I am in test1' },
);
Foo::bar();
$control->undefine();
$control = undef;
}
sub test2 {
my $control = qimplement 'Foo' => (
bar => sub { say STDOUT 'I am in test2' },
);
Foo::bar();
$control->undefine();
$control = undef;
}
Expected output:
Actual output:
Mock::Quick version: 1.111
Perl Version: 5.22.1
I'm running into an issue that is probably best illustrated with code, below. I'm not sure if I'm just using the class wrong, or if this is a bug in the Mock::Quick package:
Expected output:
Actual output:
Mock::Quick version: 1.111
Perl Version: 5.22.1