Commit | Line | Data |
bc1e29b5 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
a15dff8d |
6 | use Test::More tests => 16; |
bc1e29b5 |
7 | use Test::Exception; |
8 | |
9 | BEGIN { |
10 | use_ok('Moose'); |
11 | } |
12 | |
13 | { |
14 | package Foo; |
15 | use Moose; |
16 | } |
17 | |
18 | can_ok('Foo', 'meta'); |
19 | isa_ok(Foo->meta, 'Moose::Meta::Class'); |
20 | |
e522431d |
21 | ok(Foo->meta->has_method('meta'), '... we got the &meta method'); |
bc1e29b5 |
22 | ok(Foo->isa('Moose::Object'), '... Foo is automagically a Moose::Object'); |
23 | |
24 | foreach my $function (qw( |
25 | extends |
26 | has |
27 | before after around |
28 | blessed confess |
a15dff8d |
29 | type subtype as where |
bc1e29b5 |
30 | )) { |
31 | ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method'); |
32 | } |
33 | |