| 1 | package Test::Class::Moose::Report::Instance; | ||
| 2 | |||
| 3 | # ABSTRACT: Reporting on test classes | ||
| 4 | |||
| 5 | 30 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 30 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 30 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 30 | ▶ | use 5.010000; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 30 | our $VERSION = '1.00'; | |
| 12 | |||
| 13 | 30 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 30 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 30 | with qw( | |
| 17 | Test::Class::Moose::Role::Reporting | ||
| 18 | ); | ||
| 19 | |||
| 20 | 30 | has test_startup_method => ( | |
| 21 | is => 'rw', | ||
| 22 | isa => 'Test::Class::Moose::Report::Method', | ||
| 23 | writer => 'set_test_startup_method', | ||
| 24 | ); | ||
| 25 | |||
| 26 | 30 | has test_shutdown_method => ( | |
| 27 | is => 'rw', | ||
| 28 | isa => 'Test::Class::Moose::Report::Method', | ||
| 29 | writer => 'set_test_shutdown_method', | ||
| 30 | ); | ||
| 31 | |||
| 32 | has test_methods => ( | ||
| 33 | is => 'ro', | ||
| 34 | traits => ['Array'], | ||
| 35 | isa => 'ArrayRef[Test::Class::Moose::Report::Method]', | ||
| 36 | 47 | ▶ | default => sub { [] }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 37 | 30 | handles => { | |
| 38 | all_test_methods => 'elements', | ||
| 39 | add_test_method => 'push', | ||
| 40 | num_test_methods => 'count', | ||
| 41 | }, | ||
| 42 | ); | ||
| 43 | |||
| 44 | 87 | ▶ | sub current_method { |
|
Subroutine
current_method: called CC=1 SCAR=0.0
Pod
documented
| |||
| 45 | 87 | my $self = shift; | |
| 46 | 87 | return $self->test_methods->[-1]; | |
| 47 | } | ||
| 48 | |||
| 49 | 30 | __PACKAGE__->meta->make_immutable; | |
| 50 | |||
| 51 | 30 | 1; | |
| 52 | |||
| 53 | __END__ | ||