File Coverage

blib/lib/Test/Class/Moose/Role/Reporting.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Test::Class::Moose::Role::Reporting;
2              
3             # ABSTRACT: Reporting gathering role
4              
5 29     29   16482 use strict;
  29         112  
  29         791  
6 29     29   144 use warnings;
  29         58  
  29         651  
7 29     29   128 use namespace::autoclean;
  29         126  
  29         157  
8              
9 29     29   1792 use 5.010000;
  29         89  
10              
11             our $VERSION = '0.97';
12              
13 29     29   170 use Moose::Role;
  29         55  
  29         256  
14             with 'Test::Class::Moose::Role::HasTimeReport';
15              
16             has 'name' => (
17             is => 'ro',
18             isa => 'Str',
19             required => 1,
20             );
21              
22             has 'notes' => (
23             is => 'rw',
24             isa => 'HashRef',
25             default => sub { {} },
26             );
27              
28             has 'skipped' => (
29             is => 'rw',
30             isa => 'Str',
31             predicate => 'is_skipped',
32             );
33              
34             has 'passed' => (
35             is => 'rw',
36             isa => 'Bool',
37             default => 0,
38             );
39              
40             1;
41              
42             __END__
43              
44             =pod
45              
46             =encoding UTF-8
47              
48             =head1 NAME
49              
50             Test::Class::Moose::Role::Reporting - Reporting gathering role
51              
52             =head1 VERSION
53              
54             version 0.97
55              
56             =head1 DESCRIPTION
57              
58             Note that everything in here is experimental and subject to change.
59              
60             =head1 IMPLEMENTS
61              
62             L<Test::Class::Moose::Role::HasTimeReport>.
63              
64             =head1 REQUIRES
65              
66             None.
67              
68             =head1 PROVIDED
69              
70             =head1 ATTRIBUTES
71              
72             =head2 C<name>
73              
74             The "name" of the statistic. For a class, this should be the class name. For a
75             method, it should be the method name.
76              
77             =head2 C<notes>
78              
79             A hashref. The end user may use this to store anything desired.
80              
81             =head2 C<skipped>
82              
83             If the class or method is skipped, this will return the skip message.
84              
85             =head2 C<is_skipped>
86              
87             Returns true if the class or method is skipped.
88              
89             =head2 C<passed>
90              
91             Returns true if the class or method passed.
92              
93             =head2 C<time>
94              
95             (From L<Test::Class::Moose::Role::HasTimeReport>)
96              
97             Returns a L<Test::Class::Moose::Report::Time> object. This object
98             represents the duration of this class or method.
99              
100             =head1 SUPPORT
101              
102             Bugs may be submitted at L<https://github.com/houseabsolute/test-class-moose/issues>.
103              
104             I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>.
105              
106             =head1 SOURCE
107              
108             The source code repository for Test-Class-Moose can be found at L<https://github.com/houseabsolute/test-class-moose>.
109              
110             =head1 AUTHORS
111              
112             =over 4
113              
114             =item *
115              
116             Curtis "Ovid" Poe <ovid@cpan.org>
117              
118             =item *
119              
120             Dave Rolsky <autarch@urth.org>
121              
122             =back
123              
124             =head1 COPYRIGHT AND LICENSE
125              
126             This software is copyright (c) 2012 - 2019 by Curtis "Ovid" Poe.
127              
128             This is free software; you can redistribute it and/or modify it under
129             the same terms as the Perl 5 programming language system itself.
130              
131             The full text of the license can be found in the
132             F<LICENSE> file included with this distribution.
133              
134             =cut