App-LogStats
view release on metacpan or search on metacpan
t/09_wrong_option.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Exception;
use t::AppLogStatsTest;
t::AppLogStatsTest::set_interactive();
use Pod::Usage;
{
# mock
no warnings 'redefine'; ## no critic
*Pod::Usage::pod2usage = sub {
die "called pod2usage";
};
}
{
my $stats = App::LogStats->new;
throws_ok {
$stats->run('--this-is-no-exists-option');
} qr/^called pod2usage/, 'help';
}
done_testing;
( run in 1.055 second using v1.01-cache-2.11-cpan-437f7b0c052 )