X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpod-coverage.t;h=3ec1bf6749fc208b571a71836a77bfc1f1eb9c60;hb=5761254f90d012fed793853b501b1604eeb24d54;hp=aa1f35b21edb2021291691c332d2d5ec91f9e268;hpb=4dee0fd36e42cb0e22e39a652bd931197a72ccc3;p=gitmo%2FMooseX-ClassAttribute.git diff --git a/t/pod-coverage.t b/t/pod-coverage.t index aa1f35b..3ec1bf6 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,27 @@ 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(); +# 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::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" + ); +}