blib/lib/Mason/t/ComponentMeta.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.1% 25 / 26 CC 2 SCAR 3.4
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
test_cmeta
1.0
CRAP 1.4
« blib/lib/Mason/t/Autobase.pm ↑ Summary blib/lib/Mason/DynamicFilter.pm »
1 package Mason::t::ComponentMeta;
2 1 $Mason::t::ComponentMeta::VERSION = '2.24';
3 1 ▶use Test::Class::Most parent => 'Mason::Test::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶sub test_cmeta : Tests {
Subroutine test_cmeta: called CC=1 SCAR=0.0
Pod undocumented
6 1 my $self = shift;
7 $self->run_test_in_comp(
8 path => '/component/meta.mc',
9 args => { foo => 5, bar => [ 'baz', 7 ] },
10 1 ▶ test => sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
11 1 my $comp = shift;
12 1 my $source_file = $self->comp_root . '/component/meta.mc';
13 1 foreach my $cmeta ( $comp->cmeta, ref($comp)->cmeta ) {
14 2 is( $cmeta->path, '/component/meta.mc', 'path' );
15 2 is( $cmeta->dir_path, '/component', 'dir_path' );
16 2 is( $cmeta->is_top_level, 1, 'is_top_level' );
17 2 is( $cmeta->source_file, $source_file, 'source_file' );
18 2 like( $cmeta->object_file, qr|meta\.mc\.mobj|, 'object_file' );
19 }
20 1 my $args = $comp->args;
21 1 delete( $args->{_test} );
22 1 cmp_deeply( $args, { foo => 5, bar => [ 'baz', 7 ] } );
23 },
24 1 );
25 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 1 1;
« blib/lib/Mason/t/Autobase.pm ↑ Summary blib/lib/Mason/DynamicFilter.pm »