Another word in the dictionary
[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 = (
17 'Moose' => ['make_immutable'],
18 'Moose::Meta::Method::Constructor' =>
19 [qw( initialize_body intialize_body)],
20 'Moose::Meta::Method::Destructor' => ['initialize_body'],
21 'Moose::Role' => [
22 qw( after around augment before extends has inner make_immutable override super with )
23 ],
24);
25
26for my $module ( sort @modules ) {
27 my $trustme = [];
28 if ( $trustme{$module} ) {
29 my $methods = join '|', @{ $trustme{$module} };
30 $trustme = [qr/$methods/];
31 }
32
33 pod_coverage_ok(
34 $module, { trustme => $trustme },
35 "Pod coverage for $module"
36 );
37}