s/metaclass/__PACKAGE__->meta/
[gitmo/Moose.git] / t / 060_compat / 003_foreign_inheritence.t
index 81b2b0f..e3d8bbc 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 6; #7;
+use Test::More tests => 7;
 use Test::Exception;
 
 BEGIN {
@@ -35,7 +35,7 @@ BEGIN {
                return $class->meta->new_object('__INSTANCE__' => $super, @_);
        }
        
-       make_immutable(debug => 0);
+       __PACKAGE__->meta->make_immutable(debug => 0);
 
     package Bucket;
     use metaclass 'Class::MOP::Class';
@@ -49,7 +49,6 @@ BEGIN {
     extends 'Bucket';
 
     package MyBase;
-
     sub foo { }
 
     package Custom::Meta1;
@@ -78,10 +77,15 @@ isa_ok($foo_moose, 'Elk');
 is($foo_moose->no_moose, 'Elk', '... got the right value from the Elk method');
 is($foo_moose->moose, 'Foo', '... got the right value from the Foo::Moose method');
 
-#lives_ok { 
-#    Old::Bucket::Nose->meta->make_immutable(debug => 0); 
-#} 'Immutability on Moose class extending Class::MOP class ok';
+lives_ok { 
+    Old::Bucket::Nose->meta->make_immutable(debug => 0); 
+} 'Immutability on Moose class extending Class::MOP class ok';
+
+TODO: {
+    local $TODO = 'Needs MRO::Compat support' if $] < 5.009_005;
+    
+    lives_ok {
+      SubClass2::extends('MyBase');
+    } 'Can subclass the same non-Moose class twice with different metaclasses';
 
-lives_ok {
-  SubClass2::extends('MyBase');
-} 'Can subclass the same non-Moose class twice with different metaclasses';
+}