X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F011_process_argv.t;h=d2c174081826bd2f2d0af29f05c1b9580b9f714d;hb=55c0aed71447be5194cabb929b2301a79cfa4906;hp=c56b1fb783f95344d65fe1ae4d3e6e1e67d5822c;hpb=f361569330f174ac07999ef69bf4f58df85be084;p=gitmo%2FMooseX-Getopt.git diff --git a/t/011_process_argv.t b/t/011_process_argv.t index c56b1fb..d2c1740 100644 --- a/t/011_process_argv.t +++ b/t/011_process_argv.t @@ -4,7 +4,7 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal 0.003; if ( !eval { require Test::Deep } ) { @@ -19,28 +19,32 @@ else { 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 file.dat); my $pa; -lives_ok { - $pa = Testing::Foo->process_argv(baz => 100); -} '... this should work'; +is( + exception { + $pa = Testing::Foo->process_argv(baz => 100); + }, + undef, + '... this should work' +); isa_ok($pa, 'MooseX::Getopt::ProcessedArgv'); Test::Deep::cmp_deeply($pa->argv_copy, [