X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F003-immutable.t;h=60c275c1616ab6e0fca18bb0f05cd0b88f75ec59;hb=abf9a01fc4e37ac63054ada972091a1ea25a78cb;hp=05ff974ea5d1a0f41e40f6f88c3931e310ec4d1a;hpb=4c25692312665e52f72b16a0a3086046590cf46a;p=gitmo%2FMooseX-Singleton.git diff --git a/t/003-immutable.t b/t/003-immutable.t index 05ff974..60c275c 100644 --- a/t/003-immutable.t +++ b/t/003-immutable.t @@ -4,14 +4,10 @@ use warnings; use Scalar::Util qw( refaddr ); use Test::More; -BEGIN { - unless ( eval 'use Test::Warn; 1' ) { - plan skip_all => 'These tests require Test::Warn'; - } - else { - plan tests => 18; - } -} +use Test::Requires { + 'Test::Warn' => 0.01, # skip all if not installed +}; + { package MooseX::Singleton::Test; @@ -95,3 +91,5 @@ is( MooseX::Singleton::Test->distinct_keys, 0, "Package->clear works" ); 'singleton is not randomly destroyed' ); } + +done_testing;