Test that accessor works with lazy generation
[gitmo/Moose.git] / t / 400_moose_util / 008_method_mod_args.t
index 5919287..c4536d8 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 use Moose::Util qw( add_method_modifier );
 
 my $COUNT = 0;
@@ -14,13 +14,13 @@ my $COUNT = 0;
     sub bar { }
 }
 
-lives_ok {
+is( exception {
     add_method_modifier('Foo', 'before', [ ['foo', 'bar'], sub { $COUNT++ } ]);
-} 'method modifier with an arrayref';
+}, undef, 'method modifier with an arrayref' );
 
-dies_ok {
+isnt( exception {
     add_method_modifier('Foo', 'before', [ {'foo' => 'bar'}, sub { $COUNT++ } ]);
-} 'method modifier with a hashref';
+}, undef, 'method modifier with a hashref' );
 
 my $foo = Foo->new;
 $foo->foo;