File Coverage

blib/lib/Test/Able/Role/Meta/Method.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Test::Able::Role::Meta::Method;
2              
3 8     8   32 use Moose::Role;
  8         10  
  8         44  
4 8     8   30810 use strict;
  8         17  
  8         234  
5 8     8   32 use warnings;
  8         10  
  8         1148  
6              
7             with qw( Test::Able::Planner );
8              
9             =head1 NAME
10              
11             Test::Able::Role::Meta::Method - Method metarole
12              
13             =head1 DESCRIPTION
14              
15             This metarole gets applied to the Moose::Meta::Method metaclass objects that
16             represent methods in a Test::Able-based class or role. This metarole also
17             pulls in L<Test::Able::Planner>.
18              
19             =head1 ATTRIBUTES
20              
21             =over
22              
23             =item type
24              
25             Type of test method. See L<Test::Able::Role::Meta::Class/method_types> for
26             the list.
27              
28             =cut
29              
30             has 'type' => ( is => 'rw', isa => 'Str|Undef', );
31              
32             =item do_setup
33              
34             Only relevant for methods of type test. Boolean indicating whether
35             to run the associated setup methods.
36              
37             =cut
38              
39             has 'do_setup' => ( is => 'rw', isa => 'Bool', lazy_build => 1, );
40              
41             =item do_teardown
42              
43             Only relevant for methods of type test. Boolean indicating whether
44             to run the associated teardown methods.
45              
46             =cut
47              
48             has 'do_teardown' => ( is => 'rw', isa => 'Bool', lazy_build => 1, );
49              
50             =item order
51              
52             An integer value used to influence ordering of methods in the method lists.
53             Defaults to 0.
54              
55             =back
56              
57             =cut
58              
59             has 'order' => ( is => 'rw', isa => 'Int', lazy_build => 1, );
60              
61 36     36   1004 sub _build_do_setup { return 1; }
62              
63 36     36   965 sub _build_do_teardown { return 1; }
64              
65 74     74   1915 sub _build_plan { return 0; }
66              
67 157     157   4149 sub _build_order { return 0; }
68              
69             =head1 AUTHOR
70              
71             Justin DeVuyst, C<justin@devuyst.com>
72              
73             =head1 COPYRIGHT AND LICENSE
74              
75             Copyright 2009 by Justin DeVuyst.
76              
77             This library is free software, you can redistribute it and/or modify it under
78             the same terms as Perl itself.
79              
80             =cut
81              
82             1;