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