X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F050_metaclasses%2F050_metarole_backcompat.t;h=82462c1d49c695c0b1d492f0c73c862a842dbf0d;hb=4e1a0020d28612ce072902bf6bc94a073eb852e2;hp=ea325ae177e705e95b5ef6530b238a8b4fd084d8;hpb=f785aad8b8e799322985d8acce2bcb88fadc24a0;p=gitmo%2FMoose.git diff --git a/t/050_metaclasses/050_metarole_backcompat.t b/t/050_metaclasses/050_metarole_backcompat.t index ea325ae..82462c1 100644 --- a/t/050_metaclasses/050_metarole_backcompat.t +++ b/t/050_metaclasses/050_metarole_backcompat.t @@ -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;