use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
use Carp;
{
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';
}
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';
}
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';
}
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';
}