Redid conversion to Test::Fatal
[gitmo/Moose.git] / t / 050_metaclasses / 050_metarole_backcompat.t
index ea325ae..82462c1 100644 (file)
@@ -9,10 +9,14 @@ use warnings;
 use lib 't/lib', 'lib';
 
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 
 use Moose::Util::MetaRole;
 
+{
+    no warnings 'redefine';
+    *Moose::Deprecated::deprecated = sub { return };
+}
 
 {
     package My::Meta::Class;
@@ -579,10 +583,10 @@ use Moose::Util::MetaRole;
     }
 }
 
-lives_ok {
+is( exception {
     package UsesExportedMoose;
     ExportsMoose->import;
-} 'import module which loads a role from disk during init_meta';
+}, undef, 'import module which loads a role from disk during init_meta' );
 
 {
     package Foo::Meta::Role;
@@ -656,17 +660,12 @@ lives_ok {
         'Parent constructor class has metarole from Parent'
     );
 
-TODO:
-    {
-        local $TODO
-            = 'Moose does not see that the child differs from the parent because it only checks the class and instance metaclasses do determine compatibility';
-        ok(
-            Child->meta->constructor_class->meta->can('does_role')
-                && Child->meta->constructor_class->meta->does_role(
-                'Role::Foo'),
-            'Child constructor class has metarole from Parent'
-        );
-    }
+    ok(
+        Child->meta->constructor_class->meta->can('does_role')
+            && Child->meta->constructor_class->meta->does_role(
+            'Role::Foo'),
+        'Child constructor class has metarole from Parent'
+    );
 }
 
 done_testing;