updating the test numbers and adding the CountingClass test
[gitmo/Class-MOP.git] / t / 030_method.t
CommitLineData
cbd9f942 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
1a7ebbb3 6use Test::More tests => 9;
cbd9f942 7use Test::Exception;
8
9BEGIN {
727919c5 10 use_ok('Class::MOP');
cbd9f942 11 use_ok('Class::MOP::Method');
12}
13
14my $meta = Class::MOP::Method->meta;
15isa_ok($meta, 'Class::MOP::Class');
16
17
18{
19 my $meta = Class::MOP::Method->meta();
20 isa_ok($meta, 'Class::MOP::Class');
21
22 foreach my $method_name (qw(
23 meta
24 wrap
25 )) {
26 ok($meta->has_method($method_name), '... Class::MOP::Method->has_method(' . $method_name . ')');
27 }
28}
29
30dies_ok {
31 Class::MOP::Method->wrap()
32} '... bad args for &wrap';
33
34dies_ok {
35 Class::MOP::Method->wrap('Fail')
36} '... bad args for &wrap';
37
38dies_ok {
39 Class::MOP::Method->wrap([])
40} '... bad args for &wrap';