Test coercion of lazy defaults
[gitmo/Moose.git] / t / 030_roles / 016_runtime_roles_and_nonmoose.t
index ec4e657..2317688 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 use Scalar::Util 'blessed';
 
 
@@ -39,9 +39,9 @@ isa_ok($foo, 'Foo');
 
 ok(!$bar->can( 'talk' ), "... the role is not composed yet");
 
-dies_ok {
+isnt( exception {
     $foo->dog($bar)
-} '... and setting the accessor fails (not a Dog yet)';
+}, undef, '... and setting the accessor fails (not a Dog yet)' );
 
 Dog->meta->apply($bar);
 
@@ -49,8 +49,8 @@ ok($bar->can('talk'), "... the role is now composed at the object level");
 
 is($bar->talk, 'woof', '... got the right return value for the newly composed method');
 
-lives_ok {
+is( exception {
     $foo->dog($bar)
-} '... and setting the accessor is okay';
+}, undef, '... and setting the accessor is okay' );
 
 done_testing;