Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Perl::Critic violations in tests #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Build.PL
Expand Up @@ -32,6 +32,7 @@ my $builder = Module::Build::Pluggable->new(
'Test::Deep' => 0,
'Test::Fake::HTTPD' => 0,
'Test::More' => 0,
'Class::Load' => 0,
},
meta_merge => {
resources => {
Expand Down
7 changes: 4 additions & 3 deletions t/critic.t
Expand Up @@ -3,7 +3,8 @@ use strict;
use warnings;

use Test::More;
use Class::Load qw(try_load_class);

eval "use Test::Perl::Critic";
plan skip_all => "Test::Perl::Critic required for testing Perl::Critic" if $@;
all_critic_ok(qw/bin lib/);
try_load_class("Test::Perl::Critic")
or plan skip_all => "Test::Perl::Critic required for testing Perl::Critic";
Test::Perl::Critic::all_critic_ok(qw/bin lib t/);
12 changes: 9 additions & 3 deletions t/pod-coverage.t
@@ -1,6 +1,12 @@
#!perl -T

use warnings;
use strict;

use Test::More;
eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
all_pod_coverage_ok();
use Class::Load qw(try_load_class);

my $min_tpc = 1.04;
try_load_class('Test::Pod::Coverage', {-version => $min_tpc})
or plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage";
Test::Pod::Coverage::all_pod_coverage_ok();
12 changes: 9 additions & 3 deletions t/pod.t
@@ -1,6 +1,12 @@
#!perl -T

use warnings;
use strict;

use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
all_pod_files_ok();
use Class::Load qw(try_load_class);
my $min_tp = 1.14;

try_load_class('Test::Pod', {-version => $min_tp})
or plan skip_all => "Test::Pod $min_tp required for testing POD";
Test::Pod::all_pod_files_ok();