use Test::Requires in tests
[gitmo/Moose.git] / t / 300_immutable / 011_constructor_is_wrapped.t
index 9593833..e203db3 100644 (file)
@@ -4,11 +4,10 @@ use strict;
 use warnings;
 
 use Test::More;
-BEGIN {
-    eval "use Test::Output;";
-    plan skip_all => "Test::Output is required for this test" if $@;
-    plan tests => 1;
-}
+
+use Test::Requires {
+    'Test::Output' => '0.01', # skip all if not installed
+};
 
 {
     package ModdedNew;
@@ -29,3 +28,5 @@ BEGIN {
         'got a warning that Foo may not have an inlined constructor'
     );
 }
+
+done_testing;