allow inlining if the type has been subsequently defined
[gitmo/MooseX-Types.git] / t / 14_compatibility-sub-exporter.t
index 1a250f1..04a233d 100644 (file)
@@ -5,10 +5,7 @@ BEGIN {
     use FindBin;
     use lib "$FindBin::Bin/lib";   
     
-    eval "use Sub::Exporter";
-    plan $@
-        ? ( skip_all => "Tests require Sub::Exporter" )
-        : ( tests => 3 );
+    use Test::Requires { 'Sub::Exporter' => '0' };
 }
 
 use SubExporterCompatibility qw(MyStr something);
@@ -16,3 +13,5 @@ use SubExporterCompatibility qw(MyStr something);
 ok MyStr->check('aaa'), "Correctly passed";
 ok !MyStr->check([1]), "Correctly fails";
 ok something(), "Found the something method";
+
+done_testing;