6 use Test::More tests => 30;
14 use Moose::Util::TypeConstraints;
17 can_ok('Foo', 'meta');
18 isa_ok(Foo->meta, 'Moose::Meta::Class');
20 ok(Foo->meta->has_method('meta'), '... we got the &meta method');
21 ok(Foo->isa('Moose::Object'), '... Foo is automagically a Moose::Object');
24 Foo->meta->has_method()
25 } '... has_method requires an arg';
28 Foo->meta->has_method('')
29 } '... has_method requires an arg';
31 can_ok('Foo', 'does');
33 foreach my $function (qw(
42 ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method');
45 foreach my $import (qw(
51 ok(!Moose::Object->can($import), "no namespace pollution in Moose::Object ($import)" );
53 local $TODO = $import eq 'blessed' ? "no automatic namespace cleaning yet" : undef;
54 ok(!Foo->can($import), "no namespace pollution in Moose::Object ($import)" );