add some more tests
[gitmo/Moose.git] / t / 050_metaclasses / 052_metaclass_compat.t
index e6d9f45..f29db50 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
+use lib 't/lib';
 use Test::More;
 use Test::Exception;
 
@@ -277,4 +278,28 @@ ok(Foo::Sub->meta->constructor_class->meta->can('does_role')
     'unsafe MI extends after_generated_methods with metaclass roles (reverse)';
 }
 
+{
+    package Foo7::Meta::Trait;
+    use Moose::Role;
+}
+
+{
+    package Foo7;
+    use Moose -traits => ['Foo7::Meta::Trait'];
+}
+
+{
+    package Bar7;
+    # in an external file
+    use Moose -traits => ['Bar7::Meta::Trait'];
+    ::lives_ok { extends 'Foo7' } "role reconciliation works";
+}
+
+{
+    package Bar72;
+    # in an external file
+    use Moose -traits => ['Bar7::Meta::Trait2'];
+    ::lives_ok { extends 'Foo7' } "role reconciliation works";
+}
+
 done_testing;