6 use Test::More tests => 45;
12 my @moose_exports = qw(
29 ok(!$@, '... Moose succesfully exported into Foo');
31 can_ok('Foo', $_) for @moose_exports;
37 ok(!$@, '... Moose succesfully un-exported from Foo');
39 ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports;
41 # and check the type constraints as well
43 my @moose_type_constraint_exports = qw(
44 type subtype as where message
56 use Moose::Util::TypeConstraints;
58 ok(!$@, '... Moose::Util::TypeConstraints succesfully exported into Bar');
60 can_ok('Bar', $_) for @moose_type_constraint_exports;
64 no Moose::Util::TypeConstraints;
66 ok(!$@, '... Moose::Util::TypeConstraints succesfully un-exported from Bar');
68 ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_exports;