X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpod-coverage.t;h=f8acc7200226bb4a48a3636aa5cddea85489ca76;hb=b64c8efa3a64ace53507a9a2bb96090da56443c1;hp=105d648d9553fcd4a3c4cef89c0fabccb40f5290;hpb=7a4a3b1efe4db788811154fbecbf6c94ceeee4bf;p=gitmo%2FMooseX-ClassAttribute.git diff --git a/t/pod-coverage.t b/t/pod-coverage.t index 105d648..f8acc72 100644 --- a/t/pod-coverage.t +++ b/t/pod-coverage.t @@ -3,8 +3,12 @@ use warnings; use Test::More; +plan skip_all => 'This test is only run for the module author' + unless -d '.svn' || $ENV{IS_MAINTAINER}; + eval "use Test::Pod::Coverage 1.04"; -plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; +plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" + if $@; # This is a stripped down version of all_pod_coverage_ok which lets us # vary the trustme parameter per module. @@ -13,7 +17,8 @@ plan tests => scalar @modules; my %trustme = ( 'MooseX::ClassAttribute' => [ 'init_meta', 'class_has' ], - 'MooseX::ClassAttribute::Meta::Method::Accessor' => qr/.+/, + 'MooseX::ClassAttribute::Role::Meta::Class' => [ 'compute_all_applicable_class_attributes' ], + 'MooseX::ClassAttribute::Meta::Method::Accessor' => [ '.+' ] ); for my $module ( sort @modules ) @@ -22,16 +27,8 @@ for my $module ( sort @modules ) if ( $trustme{$module} ) { - # why is qr// not a ref? - if ( ! ref $trustme{module} ) - { - $trustme = [ $trustme{module} ] - } - else - { - my $methods = join '|', @{ $trustme{$module} }; - $trustme = [ qr/^(?:$methods)/ ]; - } + my $methods = join '|', @{ $trustme{$module} }; + $trustme = [ qr/^(?:$methods)/ ]; } pod_coverage_ok( $module, { trustme => $trustme },