Fix to all use Test::Fatal
[gitmo/MooseX-Getopt.git] / t / 011_process_argv.t
index c56b1fb..d2c1740 100644 (file)
@@ -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, [