X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F03podcoverage.t;h=b0600145987af5cddfd57828de8b5ce6a6dfbd06;hb=dc4600b2b9be4ae9a91c8ab49bdbb7ce2c23d0f7;hp=70d51eaed26b07cf39c118c993dc838186bf1a7e;hpb=014fd55671aaf0e2060e31cc2e547661346f3106;p=dbsrgits%2FDBIx-Class.git diff --git a/t/03podcoverage.t b/t/03podcoverage.t index 70d51ea..b060014 100644 --- a/t/03podcoverage.t +++ b/t/03podcoverage.t @@ -1,14 +1,30 @@ +use warnings; +use strict; + use Test::More; use List::Util (); +use lib qw(t/lib); +use DBICTest; -eval "use Pod::Coverage 0.19"; -plan skip_all => 'Pod::Coverage 0.19 required' if $@; -eval "use Test::Pod::Coverage 1.04"; -plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@; +my @MODULES = ( + 'Test::Pod::Coverage 1.08', + 'Pod::Coverage 0.20', +); -plan skip_all => 'set TEST_POD to enable this test' - unless ($ENV{TEST_POD} || -e 'MANIFEST.SKIP'); +# Don't run tests for installs +unless ( DBICTest::AuthorCheck->is_author || $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING} ) { + plan( skip_all => "Author tests not required for installation" ); +} +# Load the testing modules +foreach my $MODULE ( @MODULES ) { + eval "use $MODULE"; + if ( $@ ) { + $ENV{RELEASE_TESTING} + ? die( "Failed to load required release-testing module $MODULE" ) + : plan( skip_all => "$MODULE not available for testing" ); + } +} # Since this is about checking documentation, a little documentation # of what this is doing might be in order.