From: Dave Rolsky Date: Wed, 6 Aug 2008 19:03:48 +0000 (+0000) Subject: Redo this so we can have a per-module list of methods/subs that we X-Git-Tag: 0_55_01~43^2~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e2dab7af7bd6ff6735e21c1184e48c3e1c9f6289;p=gitmo%2FMoose.git Redo this so we can have a per-module list of methods/subs that we don't expect to be doc'd --- diff --git a/t/pod_coverage.t b/t/pod_coverage.t index dcedee4..1f6b5ba 100644 --- a/t/pod_coverage.t +++ b/t/pod_coverage.t @@ -8,4 +8,30 @@ use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; -all_pod_coverage_ok( { trustme => [ qr/intialize_body/ ] } ); +# This is a stripped down version of all_pod_coverage_ok which lets us +# vary the trustme parameter per module. +my @modules = all_modules(); +plan tests => scalar @modules; + +my %trustme = ( + 'Moose' => ['make_immutable'], + 'Moose::Meta::Method::Constructor' => + [qw( initialize_body intialize_body)], + 'Moose::Meta::Method::Destructor' => ['initialize_body'], + 'Moose::Role' => [ + qw( after around augment before extends has inner make_immutable override super with ) + ], +); + +for my $module ( sort @modules ) { + my $trustme = []; + if ( $trustme{$module} ) { + my $methods = join '|', @{ $trustme{$module} }; + $trustme = [qr/$methods/]; + } + + pod_coverage_ok( + $module, { trustme => $trustme }, + "Pod coverage for $module" + ); +}