Require the latest CMOP
[gitmo/Moose.git] / t / 010_basics / 001_basic_class_setup.t
index 00d709c..b8130f9 100644 (file)
@@ -3,11 +3,10 @@
 use strict;
 use warnings;
 
-use Test::More tests => 22;
+use Test::More;
 use Test::Exception;
 
 
-
 {
     package Foo;
     use Moose;
@@ -24,10 +23,6 @@ dies_ok {
    Foo->meta->has_method()
 } '... has_method requires an arg';
 
-dies_ok {
-   Foo->meta->has_method('')
-} '... has_method requires an arg';
-
 can_ok('Foo', 'does');
 
 foreach my $function (qw(
@@ -42,3 +37,16 @@ foreach my $function (qw(
     ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method');
 }
 
+foreach my $import (qw(
+    blessed
+    try
+    catch
+    in_global_destruction
+)) {
+    ok(!Moose::Object->can($import), "no namespace pollution in Moose::Object ($import)" );
+
+    local $TODO = $import eq 'blessed' ? "no automatic namespace cleaning yet" : undef;
+    ok(!Foo->can($import), "no namespace pollution in Moose::Object ($import)" );
+}
+
+done_testing;