6 use Test::More tests => 45;
12 my @moose_exports = qw(
20 my @moose_not_unimported = qw(
32 ok(!$@, '... Moose succesfully exported into Foo');
34 can_ok('Foo', $_) for @moose_exports;
35 can_ok('Foo', $_) for @moose_not_unimported;
41 ok(!$@, '... Moose succesfully un-exported from Foo');
43 ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports;
44 can_ok('Foo', $_) for @moose_not_unimported;
46 # and check the type constraints as well
48 my @moose_type_constraint_exports = qw(
49 type subtype as where message
61 use Moose::Util::TypeConstraints;
63 ok(!$@, '... Moose::Util::TypeConstraints succesfully exported into Bar');
65 can_ok('Bar', $_) for @moose_type_constraint_exports;
69 no Moose::Util::TypeConstraints;
71 ok(!$@, '... Moose::Util::TypeConstraints succesfully un-exported from Bar');
73 ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_exports;