1Test::Moose(3)        User Contributed Perl Documentation       Test::Moose(3)
2
3
4

NAME

6       Test::Moose - Test functions for Moose specific features
7

SYNOPSIS

9         use Test::More plan => 1;
10         use Test::Moose;
11
12         meta_ok($class_or_obj, "... Foo has a ->meta");
13         does_ok($class_or_obj, $role, "... Foo does the Baz role");
14         has_attribute_ok($class_or_obj, $attr_name, "... Foo has the 'bar' attribute");
15

DESCRIPTION

17       This module provides some useful test functions for Moose based
18       classes. It is an experimental first release, so comments and sugges‐
19       tions are very welcome.
20

EXPORTED FUNCTIONS

22       meta_ok ($class_or_object)
23           Tests if a class or object has a metaclass.
24
25       does_ok ($class_or_object, $role, ?$message)
26           Tests if a class or object does a certain role, similar to what
27           "isa_ok" does for the "isa" method.
28
29       has_attribute_ok($class_or_object, $attr_name, ?$message)
30           Tests if a class or object has a certain attribute, similar to what
31           "can_ok" does for the methods.
32

TODO

34       Convert the Moose test suite to use this module.
35       Here is a list of possible functions to write
36           immutability predicates
37           anon-class predicates
38           discovering original method from modified method
39           attribute metaclass predicates (attribute_isa?)
40

SEE ALSO

42       Test::More
43

BUGS

45       All complex software has bugs lurking in it, and this module is no
46       exception. If you find a bug please either email me, or add the bug to
47       cpan-RT.
48

AUTHOR

50       Anders Nor Berle <debolaz@gmail.com>
51
52       Stevan Little <stevan@iinteractive.com>
53
55       Copyright 2007 by Infinity Interactive, Inc.
56
57       <http://www.iinteractive.com>
58
59       This library is free software; you can redistribute it and/or modify it
60       under the same terms as Perl itself.
61
62
63
64perl v5.8.8                       2007-09-06                    Test::Moose(3)
Impressum