X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F009_gld_and_explicit_options.t;h=dadceb24c04efab7f87a2f0ec9eb1d6d1338507b;hb=6a378fbdc3c4c5ca5b9f4de5e2ad60da912e9f97;hp=266ff8cfba4df3ce1f2a6e1546ec3a1eb23cf407;hpb=630657d529277b7fb600febf001d8667d8e85184;p=gitmo%2FMooseX-Getopt.git diff --git a/t/009_gld_and_explicit_options.t b/t/009_gld_and_explicit_options.t index 266ff8c..dadceb2 100644 --- a/t/009_gld_and_explicit_options.t +++ b/t/009_gld_and_explicit_options.t @@ -3,33 +3,32 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 5; use Test::Exception; -BEGIN { - eval 'use Getopt::Long::Descriptive;'; - plan skip_all => "Getopt::Long::Descriptive required for this test" if $@; - plan tests => 5; - use_ok('MooseX::Getopt'); -} +use Test::Requires { + 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed +}; + +use_ok('MooseX::Getopt'); { package Testing::Foo; use Moose; - + with 'MooseX::Getopt'; - + has 'bar' => ( is => 'ro', - isa => 'Int', + isa => 'Int', required => 1, ); - + has 'baz' => ( is => 'ro', - isa => 'Int', - required => 1, - ); + isa => 'Int', + required => 1, + ); } @ARGV = qw(--bar 10);