Redid conversion to Test::Fatal
[gitmo/Moose.git] / t / 020_attributes / 029_accessor_context.t
old mode 100755 (executable)
new mode 100644 (file)
index a024af5..108f995
@@ -2,10 +2,10 @@
 
 use strict;
 use warnings;
-use Test::More tests => 14;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
-lives_ok {
+is( exception {
     package My::Class;
     use Moose;
 
@@ -44,9 +44,9 @@ lives_ok {
 
         auto_deref => 1,
     );
-} 'class definition';
+}, undef, 'class definition' );
 
-lives_ok {
+is( exception {
     my $o = My::Class->new();
 
     is_deeply [scalar $o->s_rw], [undef], 'uninitialized scalar attribute/rw in scalar context';
@@ -65,4 +65,6 @@ lives_ok {
     is_deeply [scalar $o->h_ro], [undef], 'uninitialized HashRef attribute/ro in scalar context';
     is_deeply [$o->h_ro],        [],      'uninitialized HashRef attribute/ro in list context';
 
-} 'testing';
+}, undef, 'testing' );
+
+done_testing;