Revert "convert all uses of Test::Exception to Test::Fatal."
[gitmo/Class-MOP.git] / t / 018_anon_class.t
index d7a0197..d314e7a 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 use Class::MOP;
 
@@ -31,18 +31,18 @@ my $anon_class_id;
             [$anon_class->superclasses],
             [],
             '... got an empty superclass list');
-        ok ! exception {
+        lives_ok {
             $anon_class->superclasses('Foo');
-        }, '... can add a superclass to anon class';
+        } '... can add a superclass to anon class';
         is_deeply(
             [$anon_class->superclasses],
             [ 'Foo' ],
             '... got the right superclass list');
 
         ok(!$anon_class->has_method('foo'), '... no foo method');
-        ok ! exception {
+        lives_ok {
             $anon_class->add_method('foo' => sub { "__ANON__::foo" });
-        }, '... added a method to my anon-class';
+        } '... added a method to my anon-class';
         ok($anon_class->has_method('foo'), '... we have a foo method now');
 
         $instance = $anon_class->new_object();