Revamped Moose::Meta::Class docs and updated coverage & spelling lists
[gitmo/Moose.git] / xt / pod_coverage.t
CommitLineData
fcd84ca9 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
7
8eval "use Test::Pod::Coverage 1.04";
9plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
10
e2dab7af 11# This is a stripped down version of all_pod_coverage_ok which lets us
12# vary the trustme parameter per module.
13my @modules = all_modules();
14plan tests => scalar @modules;
15
16my %trustme = (
93a708fd 17 'Moose' => ['make_immutable'],
18 'Moose::Meta::Attribute' => [ 'interpolate_class', 'throw_error' ],
70bb0f97 19 'Moose::Meta::Class' => [
20 qw( check_metaclass_compatibility
21 construct_instance
22 create_error
23 create_immutable_transformer
24 raise_error
25 )
26 ],
e2dab7af 27 'Moose::Meta::Method::Constructor' =>
28 [qw( initialize_body intialize_body)],
29 'Moose::Meta::Method::Destructor' => ['initialize_body'],
30 'Moose::Role' => [
70bb0f97 31 qw( after
32 around
33 augment
34 before
35 extends
36 has
37 inner
38 make_immutable
39 override
40 super
41 with )
e2dab7af 42 ],
43);
44
45for my $module ( sort @modules ) {
46 my $trustme = [];
47 if ( $trustme{$module} ) {
48 my $methods = join '|', @{ $trustme{$module} };
f37b8c3c 49 $trustme = [qr/^(?:$methods)$/];
e2dab7af 50 }
51
52 pod_coverage_ok(
53 $module, { trustme => $trustme },
54 "Pod coverage for $module"
55 );
56}