fix for prototype undecl issue when type constraint utils loaded before consumers...
[gitmo/Moose.git] / t / 042_apply_role.t
index 5a3b150..f94385e 100644 (file)
@@ -3,15 +3,13 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 39;
 use Test::Exception;
 
 BEGIN {  
     use_ok('Moose::Role');               
 }
 
-=begin nonsense
-
 {
     package FooRole;
     use Moose::Role;
@@ -29,11 +27,15 @@ BEGIN {
         'FooRole::blau -> ' . $c->();
     }; 
 
+}{
     package BarClass;
     use Moose;
     
     sub boo { 'BarClass::boo' }
     sub foo { 'BarClass::foo' }  # << the role overrides this ...  
+
+    __PACKAGE__->meta->make_immutable(debug => 0);
+}{
     
     package FooClass;
     use Moose;
@@ -44,6 +46,8 @@ BEGIN {
     sub blau { 'FooClass::blau' }
 
     sub goo { 'FooClass::goo' }  # << overrides the one from the role ... 
+    
+    __PACKAGE__->meta->make_immutable(debug => 0);
 }
 
 my $foo_class_meta = FooClass->meta;
@@ -116,5 +120,3 @@ is($foo->bar, $foo2, '... got the right value for bar now');
 is($foo->boo, 'FooRole::boo -> BarClass::boo', '... got the right value from ->boo');
 is($foo->blau, 'FooRole::blau -> FooClass::blau', '... got the right value from ->blau');
 
-=cut
-