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   2355 use strict;
  2         4  
  2         72  
3 2     2   11 use warnings;
  2         5  
  2         59  
4 2     2   9 use utf8;
  2         4  
  2         9  
5              
6             sub load {
7 2     2 0 68 my ($class, $p) = @_;
8              
9 2         6 my $app = $p->{app_prove};
10             # make pretty output for testing only one file.
11 2 50 33     5 if (@{$app->argv} == 1 && -f $app->argv->[0]) {
  2 0       13  
12 2 50 33     102 unless ($app->quiet || $app->really_quiet) {
13 0         0 $app->verbose(1);
14             }
15 2         52 $app->formatter('TAP::Formatter::Pretty::Single');
16 2         18 $app->harness('Test::Pretty::Harness');
17 2         34 $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__