No need for explicit copyright year
[gitmo/MooseX-Singleton.git] / t / 003-immutable.t
index 05ff974..60c275c 100644 (file)
@@ -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;