stupid-monkey
[gitmo/Moose.git] / t / 010_basic_class_setup.t
CommitLineData
bc1e29b5 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
a15dff8d 6use Test::More tests => 16;
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
21ok(!Foo->meta->has_method('meta'), '... we get the &meta method from Moose::Object');
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
bc1e29b5 30 )) {
31 ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method');
32}
33