Just skip the test if we don't have Capture::Tiny
[gitmo/MooseX-Getopt.git] / t / 011_version_options.t
index 09bce03..f8f5a68 100644 (file)
@@ -1,9 +1,13 @@
 use strict;
 use warnings;
-use Capture::Tiny 'capture';
 use File::Spec::Functions 'catfile';
 use Test::More;
 
+BEGIN {
+    eval "use Capture::Tiny 'capture'";
+    plan skip_all => "Capture::Tiny unavailable" if $@;
+}
+
 my $HAVE_SIMPLECONFIG = eval {
     require MooseX::SimpleConfig;
     return 1;