Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 070_native_traits / 060_trait_number.t
index 64d0b17..6b24631 100644 (file)
@@ -8,7 +8,7 @@ use lib 't/lib';
 use Moose ();
 use Moose::Util::TypeConstraints;
 use NoInlineAttribute;
-use Test::Fatal;
+use Test::Exception;
 use Test::More;
 use Test::Moose;
 
@@ -87,7 +87,7 @@ sub run_tests {
 
         is( $obj->integer, 15, 'Add ten for fithteen' );
 
-        like exception { $obj->add( 10, 2 ) },
+        throws_ok { $obj->add( 10, 2 ) }
         qr/Cannot call add with more than 1 argument/,
             'add throws an error when 2 arguments are passed';
 
@@ -95,7 +95,7 @@ sub run_tests {
 
         is( $obj->integer, 12, 'Subtract three for 12' );
 
-        like exception { $obj->sub( 10, 2 ) },
+        throws_ok { $obj->sub( 10, 2 ) }
         qr/Cannot call sub with more than 1 argument/,
             'sub throws an error when 2 arguments are passed';
 
@@ -103,7 +103,7 @@ sub run_tests {
 
         is( $obj->integer, 10, 'Set to ten' );
 
-        like exception { $obj->set( 10, 2 ) },
+        throws_ok { $obj->set( 10, 2 ) }
         qr/Cannot call set with more than 1 argument/,
             'set throws an error when 2 arguments are passed';
 
@@ -111,7 +111,7 @@ sub run_tests {
 
         is( $obj->integer, 5, 'divide by 2' );
 
-        like exception { $obj->div( 10, 2 ) },
+        throws_ok { $obj->div( 10, 2 ) }
         qr/Cannot call div with more than 1 argument/,
             'div throws an error when 2 arguments are passed';
 
@@ -119,7 +119,7 @@ sub run_tests {
 
         is( $obj->integer, 10, 'multiplied by 2' );
 
-        like exception { $obj->mul( 10, 2 ) },
+        throws_ok { $obj->mul( 10, 2 ) }
         qr/Cannot call mul with more than 1 argument/,
             'mul throws an error when 2 arguments are passed';
 
@@ -127,7 +127,7 @@ sub run_tests {
 
         is( $obj->integer, 0, 'Mod by 2' );
 
-        like exception { $obj->mod( 10, 2 ) },
+        throws_ok { $obj->mod( 10, 2 ) }
         qr/Cannot call mod with more than 1 argument/,
             'mod throws an error when 2 arguments are passed';
 
@@ -141,7 +141,7 @@ sub run_tests {
 
         is( $obj->abs, 1, 'abs returns new value' );
 
-        like exception { $obj->abs(10) },
+        throws_ok { $obj->abs(10) }
         qr/Cannot call abs with any arguments/,
             'abs throws an error when an argument is passed';