Test that accessor works with lazy generation
[gitmo/Moose.git] / t / 010_basics / 010_method_modifier_with_regexp.t
index 41f55cd..2cc2776 100644 (file)
@@ -3,9 +3,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 9;
-use Test::Exception;
-
+use Test::More;
+use Test::Fatal;
 
 
 {
@@ -70,17 +69,18 @@ is( $Cat::AFTER_BARK_COUNTER,  2, 'after modifier is called twice' );
     package Dog::Role;
     use Moose::Role;
 
-    ::dies_ok {
+    ::isnt( ::exception {
         before qr/bark.*/ => sub {};
-    } '... this is not currently supported';
+    }, undef, '... this is not currently supported' );
 
-    ::dies_ok {
+    ::isnt( ::exception {
         around qr/bark.*/ => sub {};
-    } '... this is not currently supported';    
-    
-    ::dies_ok {    
+    }, undef, '... this is not currently supported' );
+
+    ::isnt( ::exception {
         after  qr/bark.*/ => sub {};
-    } '... this is not currently supported';    
+    }, undef, '... this is not currently supported' );
 
 }
 
+done_testing;