move xt tests to xt/author for Module::Install to work
[gitmo/MooseX-Singleton.git] / xt / author / pod-coverage.t
CommitLineData
da16d915 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
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 'MooseX::Singleton' => ['init_meta'],
18 'MooseX::Singleton::Role::Meta::Class' =>
19 [qw( clear_singleton existing_singleton )],
20 'MooseX::Singleton::Role::Meta::Instance' => ['get_singleton_instance'],
21 'MooseX::Singleton::Role::Object' => [qw( initialize instance )],
22);
23
24for my $module ( sort @modules ) {
25 my $trustme = [];
26 if ( $trustme{$module} ) {
27 my $methods = join '|', @{ $trustme{$module} };
28 $trustme = [qr/^(?:$methods)$/];
29 }
30
31 pod_coverage_ok(
32 $module, { trustme => $trustme },
33 "Pod coverage for $module"
34 );
35}