avoid warning in TC-with-dash test
[gitmo/Moose.git] / t / 020_attributes / 007_attribute_custom_metaclass.t
index 25c3d1b..c1f518e 100644 (file)
@@ -3,9 +3,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 16;
-use Test::Exception;
-
+use Test::More;
+use Test::Fatal;
 
 
 {
@@ -54,9 +53,9 @@ use Test::Exception;
     package Bar;
     use Moose;
 
-    ::lives_ok {
+    ::ok ! ::exception {
         has 'bar' => (metaclass => 'Bar::Meta::Attribute');
-    } '... the attribute metaclass need not be a Moose::Meta::Attribute as long as it behaves';
+    }, '... the attribute metaclass need not be a Moose::Meta::Attribute as long as it behaves';
 }
 
 {
@@ -71,13 +70,13 @@ use Test::Exception;
     package Another::Foo;
     use Moose;
 
-    ::lives_ok {
+    ::ok ! ::exception {
         has 'foo' => (metaclass => 'Foo');
-    } '... the attribute metaclass alias worked correctly';
+    }, '... the attribute metaclass alias worked correctly';
 
-    ::lives_ok {
+    ::ok ! ::exception {
         has 'bar' => (metaclass => 'Bar', is => 'bare');
-    } '... the attribute metaclass alias worked correctly';
+    }, '... the attribute metaclass alias worked correctly';
 }
 
 {
@@ -90,4 +89,4 @@ use Test::Exception;
     isa_ok($bar_attr, 'Moose::Meta::Attribute');
 }
 
-
+done_testing;