X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F500_deprecated.t;fp=t%2F500_deprecated.t;h=b474992995554d1a34203b777ff1faf3e28a075a;hb=13b8971fa6cc4edf7d55a2e5482820d62ba38f16;hp=df0eaf56965db84a754528b5ce241f8037d1bf51;hpb=7ac8038438a75837e0d4976dd45cb53f77124fb4;p=gitmo%2FClass-MOP.git diff --git a/t/500_deprecated.t b/t/500_deprecated.t index df0eaf5..b474992 100755 --- a/t/500_deprecated.t +++ b/t/500_deprecated.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; use Carp; @@ -11,9 +11,9 @@ $SIG{__WARN__} = \&croak; { package Foo; - ::throws_ok{ + ::like ::exception { 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; - ::throws_ok{ + ::like ::exception { 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; - ::lives_ok{ + ::ok ! ::exception { 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; - ::throws_ok{ Foo2->meta->get_attribute_map } + ::like ::exception { Foo2->meta->get_attribute_map }, qr/\Qget_attribute_map method has been deprecated/, 'get_attribute_map is deprecated'; }