From: Karen Etheridge Date: Mon, 16 Aug 2010 20:39:07 +0000 (-0700) Subject: convert to using Test::Requires X-Git-Tag: 0.12~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=73760f4826b785ef0bc960d80a8b814c50482a48;p=gitmo%2FMooseX-AlwaysCoerce.git convert to using Test::Requires --- diff --git a/Makefile.PL b/Makefile.PL index 39093b2..c45ddf4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -8,6 +8,7 @@ license 'perl'; test_requires 'Test::More' => '0.94'; test_requires 'Test::Exception'; test_requires 'Test::NoWarnings'; +test_requires 'Test::Requires'; requires 'Moose'; requires 'namespace::autoclean'; diff --git a/t/02-mx-m-s.t b/t/02-mx-m-s.t index e79bac8..083535b 100644 --- a/t/02-mx-m-s.t +++ b/t/02-mx-m-s.t @@ -2,15 +2,11 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 3; -BEGIN { - if (eval { require MooseX::Method::Signatures }) { - plan tests => 3; - } else { - plan skip_all => 'This test needs MooseX::Method::Signatures'; - } -} +use Test::Requires { + 'MooseX::Method::Signatures' => 0.01, +}; use Test::Exception; use Test::NoWarnings; diff --git a/t/04-parameterized-roles.t b/t/04-parameterized-roles.t index d735cdd..cf50dfa 100644 --- a/t/04-parameterized-roles.t +++ b/t/04-parameterized-roles.t @@ -5,9 +5,9 @@ use warnings; use Test::More; use Test::Exception; -unless (eval { require MooseX::Role::Parameterized }) { - plan skip_all => 'This test needs MooseX::Role::Parameterized'; -} +use Test::Requires { + 'MooseX::Role::Parameterized' => 0.01, +}; eval <<'EOF'; package Role;