-#!/usr/bin/perl
-
use strict;
use warnings;
-use Test::More;
-use Test::Exception;
-
-if ( !eval { require Test::Deep } )
-{
- plan skip_all => 'Test requires Test::Deep';
- exit;
-}
-else
-{
- plan tests => 6;
-}
+use Test::More tests => 6;
+use Test::Fatal 0.003;
+use Test::Requires 'Test::Deep';
{
package Testing::Foo;
@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, [