From: Karen Etheridge Date: Mon, 16 Aug 2010 21:14:17 +0000 (-0700) Subject: convert to using Test::Requires X-Git-Tag: 0.25~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=abf9a01fc4e37ac63054ada972091a1ea25a78cb;p=gitmo%2FMooseX-Singleton.git convert to using Test::Requires --- diff --git a/Makefile.PL b/Makefile.PL index b460a48..b9f6933 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,6 +10,7 @@ requires 'Moose' => '0.94'; build_requires 'Scalar::Util'; build_requires 'Test::More' => '0.88'; build_requires 'Test::Exception'; +build_requires 'Test::Requires'; license 'Perl'; diff --git a/t/003-immutable.t b/t/003-immutable.t index 618391e..60c275c 100644 --- a/t/003-immutable.t +++ b/t/003-immutable.t @@ -4,10 +4,10 @@ use warnings; use Scalar::Util qw( refaddr ); use Test::More; -BEGIN { - eval 'use Test::Warn'; - plan skip_all => 'These tests require Test::Warn' if $@; -} +use Test::Requires { + 'Test::Warn' => 0.01, # skip all if not installed +}; + { package MooseX::Singleton::Test; diff --git a/t/006-cooperative.t b/t/006-cooperative.t index 4a52662..fdae12f 100644 --- a/t/006-cooperative.t +++ b/t/006-cooperative.t @@ -3,12 +3,10 @@ use warnings; use Test::More; -BEGIN { - eval "require MooseX::StrictConstructor; use Test::Exception;"; - plan skip_all => - 'This test requires MooseX::StrictConstructor and Test::Exception' - if $@; -} +use Test::Requires { + 'MooseX::StrictConstructor' => 0.01, # skip all if not installed + 'Test::Exception' => 0.01, +}; { package MySingleton;