6 use Test::More tests => 46;
10 my @moose_exports = qw(
28 ok(!$@, '... Moose succesfully exported into Foo');
30 can_ok('Foo', $_) for @moose_exports;
36 ok(!$@, '... Moose succesfully un-exported from Foo');
38 ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports;
40 # and check the type constraints as well
42 my @moose_type_constraint_exports = qw(
43 type subtype as where message
55 use Moose::Util::TypeConstraints;
57 ok(!$@, '... Moose::Util::TypeConstraints succesfully exported into Bar');
59 can_ok('Bar', $_) for @moose_type_constraint_exports;
63 no Moose::Util::TypeConstraints;
65 ok(!$@, '... Moose::Util::TypeConstraints succesfully un-exported from Bar');
67 ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_exports;