From f45a6241c18e5aea4dab46007f252e51dad78569 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Mon, 16 Aug 2010 13:39:07 -0700 Subject: convert to using Test::Requires --- Makefile.PL | 1 + t/02-mx-m-s.t | 12 ++++-------- t/04-parameterized-roles.t | 6 +++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 39093b2..e41c5f9 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; -- cgit v1.2.3