convert all uses of Test::Exception to Test::Fatal.
[gitmo/Moose.git] / t / 070_native_traits / 040_trait_counter.t
index ae7e816..ac98bc8 100644 (file)
@@ -8,7 +8,7 @@ use lib 't/lib';
 use Moose ();
 use Moose::Util::TypeConstraints;
 use NoInlineAttribute;
-use Test::Exception;
+use Test::Fatal;
 use Test::More;
 use Test::Moose;
 
@@ -85,28 +85,28 @@ sub run_tests {
         is( $obj->inc_counter, 2, 'inc returns new value' );
         is( $obj->counter, 2, '... got the incremented value (again)' );
 
-        throws_ok { $obj->inc_counter( 1, 2 ) }
+        like exception { $obj->inc_counter( 1, 2 ) },
         qr/Cannot call inc with more than 1 argument/,
             'inc throws an error when two arguments are passed';
 
         is( $obj->dec_counter, 1, 'dec returns new value' );
         is( $obj->counter, 1, '... got the decremented value' );
 
-        throws_ok { $obj->dec_counter( 1, 2 ) }
+        like exception { $obj->dec_counter( 1, 2 ) },
         qr/Cannot call dec with more than 1 argument/,
             'dec throws an error when two arguments are passed';
 
         is( $obj->reset_counter, 0, 'reset returns new value' );
         is( $obj->counter, 0, '... got the original value' );
 
-        throws_ok { $obj->reset_counter(2) }
+        like exception { $obj->reset_counter(2) },
         qr/Cannot call reset with any arguments/,
             'reset throws an error when an argument is passed';
 
         is( $obj->set_counter(5), 5, 'set returns new value' );
         is( $obj->counter, 5, '... set the value' );
 
-        throws_ok { $obj->set_counter( 1, 2 ) }
+        like exception { $obj->set_counter( 1, 2 ) },
         qr/Cannot call set with more than 1 argument/,
             'set throws an error when two arguments are passed';