X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpod-coverage.t;h=f8acc7200226bb4a48a3636aa5cddea85489ca76;hb=b64c8efa3a64ace53507a9a2bb96090da56443c1;hp=4005e5e587e91d6079813df02aecf2c362b0d9dc;hpb=8d65540448deca131e4c77686c6a1135116e522e;p=gitmo%2FMooseX-ClassAttribute.git diff --git a/t/pod-coverage.t b/t/pod-coverage.t index 4005e5e..f8acc72 100644 --- a/t/pod-coverage.t +++ b/t/pod-coverage.t @@ -3,7 +3,6 @@ use warnings; use Test::More; - plan skip_all => 'This test is only run for the module author' unless -d '.svn' || $ENV{IS_MAINTAINER}; @@ -11,4 +10,28 @@ 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/^(?:class_has|process_class_attribute|container_class|unimport)$/ ] } ); +# 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 = + ( 'MooseX::ClassAttribute' => [ 'init_meta', 'class_has' ], + 'MooseX::ClassAttribute::Role::Meta::Class' => [ 'compute_all_applicable_class_attributes' ], + 'MooseX::ClassAttribute::Meta::Method::Accessor' => [ '.+' ] + ); + +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" + ); +}