Warn when an accessor for one attr overwrites another attr's accessor.
[gitmo/Moose.git] / t / 100_bugs / 005_inline_reader_bug.t
index 2e67750..7500dcd 100644 (file)
@@ -3,14 +3,13 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
-use Test::Exception;
-
+use Test::More;
+use Test::Fatal;
 
 
 =pod
 
-This was a bug, but it is fixed now. This 
+This was a bug, but it is fixed now. This
 test makes sure it does not creep back in.
 
 =cut
@@ -18,14 +17,15 @@ test makes sure it does not creep back in.
 {
     package Foo;
     use Moose;
-    
-    ::lives_ok {
+
+    ::is( ::exception {
         has 'bar' => (
-            is      => 'ro', 
+            is      => 'ro',
             isa     => 'Int',
             lazy    => 1,
             default => 10,
         );
-    } '... this didnt die';
+    }, undef, '... this didnt die' );
 }
-  
+
+done_testing;