Commit | Line | Data |
31f8ec72 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More tests => 23; |
7 | |
8 | BEGIN { |
9 | use_ok('Moose'); |
10 | } |
11 | |
12 | my @moose_exports = qw( |
13 | extends with |
14 | has |
15 | before after around |
16 | override super |
17 | augment inner |
18 | ); |
19 | |
20 | { |
21 | package Foo; |
22 | } |
23 | |
24 | eval q{ |
25 | package Foo; |
26 | use Moose; |
27 | }; |
28 | ok(!$@, '... Moose succesfully exported into Foo'); |
29 | |
30 | can_ok('Foo', $_) for @moose_exports; |
31 | |
32 | eval q{ |
33 | package Foo; |
34 | no Moose; |
35 | }; |
36 | ok(!$@, '... Moose succesfully un-exported from Foo'); |
37 | |
38 | ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports; |