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 30     30   16362 use strict;
  30         97  
  30         787  
6 30     30   131 use warnings;
  30         60  
  30         657  
7 30     30   131 use namespace::autoclean;
  30         92  
  30         165  
8              
9 30     30   1724 use 5.010000;
  30         93  
10              
11             our $VERSION = '0.98';
12              
13 30     30   151 use Moose::Role;
  30         60  
  30         371  
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.98
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