Revert "convert all uses of Test::Exception to Test::Fatal."
[gitmo/Class-MOP.git] / t / 071_immutable_w_custom_metaclass.t
index fce35f4..92c5f8a 100644 (file)
@@ -5,7 +5,7 @@ use FindBin;
 use File::Spec::Functions;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 use Scalar::Util;
 
 use Class::MOP;
@@ -40,7 +40,7 @@ use lib catdir( $FindBin::Bin, 'lib' );
         shift->meta->mymetaclass_attributes;
     }
 
-    ::ok ! ::exception { Baz->meta->superclasses('Bar') },
+    ::lives_ok{ Baz->meta->superclasses('Bar') }
         '... we survive the metaclass incompatibility test';
 }
 
@@ -58,7 +58,7 @@ use lib catdir( $FindBin::Bin, 'lib' );
         '... Baz can do method before immutable' );
     ok( $meta->can('mymetaclass_attributes'),
         '... meta can do method before immutable' );
-    ok ! exception { $meta->make_immutable }, "Baz is now immutable";
+    lives_ok { $meta->make_immutable } "Baz is now immutable";
     ok( $meta->is_immutable, '... Baz is immutable' );
     isa_ok( $meta, 'MyMetaClass', 'Baz->meta' );
     ok( Baz->can('mymetaclass_attributes'),
@@ -68,7 +68,7 @@ use lib catdir( $FindBin::Bin, 'lib' );
     isnt( Scalar::Util::blessed( Baz->meta ),
         Scalar::Util::blessed( Bar->meta ),
         'Baz and Bar immutable metaclasses are different' );
-    ok ! exception { $meta->make_mutable }, "Baz is now mutable";
+    lives_ok { $meta->make_mutable } "Baz is now mutable";
     ok( $meta->is_mutable, '... Baz is mutable again' );
 }