clean up ::Destructor
[gitmo/Moose.git] / t / 030_roles / 018_runtime_roles_w_params.t
index 33de3c3..8697ef0 100644 (file)
@@ -3,9 +3,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 21;
-use Test::Exception;
-
+use Test::More;
+use Test::Fatal;
 
 
 {
@@ -27,9 +26,9 @@ use Test::Exception;
     is($foo->bar, 'BAR', '... got the expect value');
     ok(!$foo->can('baz'), '... no baz method though');
 
-    lives_ok {
+    is( exception {
         Bar->meta->apply($foo)
-    } '... this works';
+    }, undef, '... this works' );
 
     is($foo->bar, 'BAR', '... got the expect value');
     ok($foo->can('baz'), '... we have baz method now');
@@ -44,9 +43,9 @@ use Test::Exception;
     is($foo->bar, 'BAR', '... got the expect value');
     ok(!$foo->can('baz'), '... no baz method though');
 
-    lives_ok {
+    is( exception {
         Bar->meta->apply($foo, (rebless_params => { baz => 'FOO-BAZ' }))
-    } '... this works';
+    }, undef, '... this works' );
 
     is($foo->bar, 'BAR', '... got the expect value');
     ok($foo->can('baz'), '... we have baz method now');
@@ -61,13 +60,13 @@ use Test::Exception;
     is($foo->bar, 'BAR', '... got the expect value');
     ok(!$foo->can('baz'), '... no baz method though');
 
-    lives_ok {
+    is( exception {
         Bar->meta->apply($foo, (rebless_params => { bar => 'FOO-BAR', baz => 'FOO-BAZ' }))
-    } '... this works';
+    }, undef, '... this works' );
 
     is($foo->bar, 'FOO-BAR', '... got the expect value');
     ok($foo->can('baz'), '... we have baz method now');
     is($foo->baz, 'FOO-BAZ', '... got the expect value');
 }
 
-
+done_testing;