Revert "convert all uses of Test::Exception to Test::Fatal."
[gitmo/Class-MOP.git] / t / 500_deprecated.t
index b474992..df0eaf5 100755 (executable)
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 use Carp;
 
@@ -11,9 +11,9 @@ $SIG{__WARN__} = \&croak;
 {
     package Foo;
 
-    ::like ::exception {
+    ::throws_ok{
         Class::MOP::in_global_destruction();
-        }, qr/\b deprecated \b/xmsi,
+        } qr/\b deprecated \b/xmsi,
         'Class::MOP::in_global_destruction is deprecated';
 }
 
@@ -22,9 +22,9 @@ $SIG{__WARN__} = \&croak;
 
     use Class::MOP::Deprecated -api_version => 0.93;
 
-    ::like ::exception {
+    ::throws_ok{
         Class::MOP::in_global_destruction();
-        }, qr/\b deprecated \b/xmsi,
+        } qr/\b deprecated \b/xmsi,
         'Class::MOP::in_global_destruction is deprecated with 0.93 compatibility';
 }
 
@@ -33,9 +33,9 @@ $SIG{__WARN__} = \&croak;
 
     use Class::MOP::Deprecated -api_version => 0.92;
 
-    ::ok ! ::exception {
+    ::lives_ok{
         Class::MOP::in_global_destruction();
-        },
+        }
         'Class::MOP::in_global_destruction is not deprecated with 0.92 compatibility';
 }
 
@@ -44,7 +44,7 @@ $SIG{__WARN__} = \&croak;
 
     use metaclass;
 
-    ::like ::exception { Foo2->meta->get_attribute_map },
+    ::throws_ok{ Foo2->meta->get_attribute_map }
         qr/\Qget_attribute_map method has been deprecated/,
         'get_attribute_map is deprecated';
 }