1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
use strict;
use warnings
FATAL => qw( all ),
NONFATAL => qw( deprecated exec internal malloc newline once portable redefine recursion uninitialized );
use Test::Builder::Tester tests => 1;
use FindBin;
use lib "$FindBin::Bin/../../../..";
my $title = "mock 'close'";
use Test::Expander
-builtins => { close => sub { $title } },
-method => 'my_func',
-target => 't::Test::Expander::NoCLASS::MyModule';
test_out( "ok 1 - $title" );
is( $METHOD_REF->(), $title, $title );
test_test( $title );
done_testing();
|