blib/lib/Poet/t/Util.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 97.3% 37 / 38 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Poet/t/Subclassing.pm ↑ Summary blib/lib/Poet/Moose.pm »
1 package Poet::t::Util;
2 1 $Poet::t::Util::VERSION = '0.16';
3 1 ▶use Test::Class::Most parent => 'Poet::Test::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Poet::Tools qw(read_file);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Poet::Util::Debug qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Capture::Tiny qw(capture_stderr);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 my $poet = __PACKAGE__->initialize_temp_env( conf => { layer => 'development' } );
9  
10 1 ▶sub test_debug : Tests {
Subroutine test_debug: called CC=1 SCAR=0.0
Pod undocumented
11 1 my $data = { foo => 5, bar => 6 };
12 1 my $expect = qr|\[d. at .* line .*\] \[\d+\] \{\n bar => 6,\n foo => 5\n\}|;
13  
14 1 ▶ throws_ok { dd($data) } $expect, "dd";
Subroutine __ANON__: called CC=1 SCAR=0.0
15 1 like( dh($data), $expect, "dh" );
16 1 ▶ like( capture_stderr { dp($data) }, $expect, "dp" );
Subroutine __ANON__: called CC=1 SCAR=0.0
17  
18 1 my $console_log = $poet->logs_path("console.log");
19 1 ok( !-f $console_log, "no console log" );
20 1 dc($data);
21 1 like( read_file($console_log), qr|$expect|, "dc" );
22 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 1 1;
« blib/lib/Poet/t/Subclassing.pm ↑ Summary blib/lib/Poet/Moose.pm »