Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 070_native_traits / 011_array_subtypes.t
index 65ba399..5daa36a 100644 (file)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 {
     use Moose::Util::TypeConstraints;
@@ -75,7 +75,7 @@ my $foo = Foo->new;
     $foo->array_int( [] );
     is_deeply( $foo->array_int, [], "array_int - correct contents" );
 
-    ok exception { $foo->push_array_int('foo') },
+    dies_ok { $foo->push_array_int('foo') }
     "array_int - can't push wrong type";
     is_deeply( $foo->array_int, [], "array_int - correct contents" );
 
@@ -84,12 +84,12 @@ my $foo = Foo->new;
 }
 
 {
-    ok exception { $foo->push_a1('foo') }, "a1 - can't push onto undef";
+    dies_ok { $foo->push_a1('foo') } "a1 - can't push onto undef";
 
     $foo->a1( [] );
     is_deeply( $foo->a1, [], "a1 - correct contents" );
 
-    ok exception { $foo->push_a1('foo') }, "a1 - can't push wrong type";
+    dies_ok { $foo->push_a1('foo') } "a1 - can't push wrong type";
 
     is_deeply( $foo->a1, [], "a1 - correct contents" );
 
@@ -98,7 +98,7 @@ my $foo = Foo->new;
 }
 
 {
-    ok exception { $foo->push_a2('foo') }, "a2 - can't push onto undef";
+    dies_ok { $foo->push_a2('foo') } "a2 - can't push onto undef";
 
     $foo->a2( [] );
     is_deeply( $foo->a2, [], "a2 - correct contents" );
@@ -106,20 +106,20 @@ my $foo = Foo->new;
     $foo->push_a2('foo');
     is_deeply( $foo->a2, ['foo'], "a2 - correct contents" );
 
-    ok exception { $foo->push_a2('bar') }, "a2 - can't push more than one element";
+    dies_ok { $foo->push_a2('bar') } "a2 - can't push more than one element";
 
     is_deeply( $foo->a2, ['foo'], "a2 - correct contents" );
 }
 
 {
-    ok exception { $foo->push_a3(1) }, "a3 - can't push onto undef";
+    dies_ok { $foo->push_a3(1) } "a3 - can't push onto undef";
 
     $foo->a3( [] );
     is_deeply( $foo->a3, [], "a3 - correct contents" );
 
-    ok exception { $foo->push_a3('foo') }, "a3 - can't push non-int";
+    dies_ok { $foo->push_a3('foo') } "a3 - can't push non-int";
 
-    ok exception { $foo->push_a3(100) },
+    dies_ok { $foo->push_a3(100) }
     "a3 - can't violate overall type constraint";
 
     is_deeply( $foo->a3, [], "a3 - correct contents" );
@@ -127,7 +127,7 @@ my $foo = Foo->new;
     $foo->push_a3(1);
     is_deeply( $foo->a3, [1], "a3 - correct contents" );
 
-    ok exception { $foo->push_a3(100) },
+    dies_ok { $foo->push_a3(100) }
     "a3 - can't violate overall type constraint";
 
     is_deeply( $foo->a3, [1], "a3 - correct contents" );