got rid of all the use_ok junk except for 000_load.t
[gitmo/Class-MOP.git] / t / 071_immutable_w_custom_metaclass.t
index 4d2eba0..961d71b 100644 (file)
@@ -6,13 +6,11 @@ use warnings;
 use FindBin;
 use File::Spec::Functions;
 
-use Test::More tests => 15;
+use Test::More tests => 14;
 use Test::Exception;
 use Scalar::Util;
 
-BEGIN {
-    use_ok('Class::MOP');
-}
+use Class::MOP;
 
 use lib catdir($FindBin::Bin, 'lib');
 
@@ -45,14 +43,14 @@ use lib catdir($FindBin::Bin, 'lib');
 
     ::lives_ok {
         Baz->meta->superclasses('Bar');
-    } '... we survive the metaclass incompatability test';
+    } '... we survive the metaclass incompatibility test';
 }
 
 {
     my $meta = Baz->meta;
     ok($meta->is_mutable, '... Baz is mutable');
-    is(Foo->meta->blessed, Bar->meta->blessed, 'Foo and Bar immutable metaclasses match');
-    is($meta->blessed, 'MyMetaClass', 'Baz->meta blessed as MyMetaClass');
+    is(Scalar::Util::blessed(Foo->meta), Scalar::Util::blessed(Bar->meta), 'Foo and Bar immutable metaclasses match');
+    is(Scalar::Util::blessed($meta), 'MyMetaClass', 'Baz->meta blessed as MyMetaClass');
     ok(Baz->can('mymetaclass_attributes'), '... Baz can do method before immutable');
     ok($meta->can('mymetaclass_attributes'), '... meta can do method before immutable');
     lives_ok { $meta->make_immutable } "Baz is now immutable";
@@ -60,7 +58,7 @@ use lib catdir($FindBin::Bin, 'lib');
     isa_ok($meta, 'MyMetaClass', 'Baz->meta');
     ok(Baz->can('mymetaclass_attributes'), '... Baz can do method after imutable');
     ok($meta->can('mymetaclass_attributes'), '... meta can do method after immutable');
-    isnt(Baz->meta->blessed, Bar->meta->blessed, 'Baz and Bar immutable metaclasses are different');
+    isnt(Scalar::Util::blessed(Baz->meta), Scalar::Util::blessed(Bar->meta), 'Baz and Bar immutable metaclasses are different');
     lives_ok { $meta->make_mutable } "Baz is now mutable";
     ok($meta->is_mutable, '... Baz is mutable again');
 }