added default {} keyword
[gitmo/Moose.git] / t / 018_import_unimport.t
CommitLineData
31f8ec72 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More tests => 23;
7
8BEGIN {
9 use_ok('Moose');
10}
11
12my @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
24eval q{
25 package Foo;
26 use Moose;
27};
28ok(!$@, '... Moose succesfully exported into Foo');
29
30can_ok('Foo', $_) for @moose_exports;
31
32eval q{
33 package Foo;
34 no Moose;
35};
36ok(!$@, '... Moose succesfully un-exported from Foo');
37
38ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports;