App-CISetup
view release on metacpan or search on metacpan
t/lib/R/Tester.pm view on Meta::CPAN
package R::Tester;
use strict;
use warnings;
use namespace::autoclean;
use Moose::Role;
use Test2::V0 '!meta';
use YAML qw( Load );
## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
sub _test_cisetup_flags_comment {
my $self = shift;
my $file = shift;
my $expect = shift;
my ($comment)
= $file->slurp_utf8
=~ /### __app_cisetup__\r?\n(.+)### __app_cisetup__/s;
$comment =~ s/^# //mg;
my $got = Load($comment);
is(
$got,
$expect,
'expected config is stored as a comment at the end of the file'
);
}
## use critic
1;
( run in 0.903 second using v1.01-cache-2.11-cpan-98e64b0badf )