File Coverage

blib/lib/App/Prove/Plugin/Pretty.pm
Criterion Covered Total %
statement 17 21 80.9
branch 2 6 33.3
condition 2 6 33.3
subroutine 4 4 100.0
pod 0 1 0.0
total 25 38 65.7


line stmt bran cond sub pod time code
1             package App::Prove::Plugin::Pretty;
2 2     2   986 use strict;
  2         5  
  2         78  
3 2     2   14 use warnings;
  2         4  
  2         56  
4 2     2   11 use utf8;
  2         3  
  2         10  
5              
6             sub load {
7 2     2 0 71 my ($class, $p) = @_;
8              
9 2         5 my $app = $p->{app_prove};
10             # make pretty output for testing only one file.
11 2 50 33     2 if (@{$app->argv} == 1 && -f $app->argv->[0]) {
  2 0       12  
12 2 50 33     83 unless ($app->quiet || $app->really_quiet) {
13 0         0 $app->verbose(1);
14             }
15 2         45 $app->formatter('TAP::Formatter::Pretty::Single');
16 2         16 $app->harness('Test::Pretty::Harness');
17 2         30 $ENV{PERL_TEST_PRETTY_ENABLED} = 1;
18             } elsif ($app->verbose) {
19             # make pretty output for verbose multiple file test.
20 0           $app->formatter('TAP::Formatter::Pretty::Multi');
21 0           $app->harness('Test::Pretty::Harness');
22 0           $ENV{PERL_TEST_PRETTY_ENABLED} = 1;
23             } else {
24             # do nothing.
25             }
26             }
27              
28             1;
29             __END__