X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F03podcoverage.t;h=b0600145987af5cddfd57828de8b5ce6a6dfbd06;hb=00f3b1c7f44dd29244b4ecdf99150278700ee14f;hp=be12acac06719f4e13caecf07f39aa8b564e03f1;hpb=32978f6e7b0b455aa2b6bb1011025bc950e0e323;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/03podcoverage.t b/t/03podcoverage.t index be12aca..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. @@ -76,6 +92,7 @@ my $exceptions = { 'DBIx::Class::ResultSetProxy' => { skip => 1 }, 'DBIx::Class::ResultSourceProxy' => { skip => 1 }, 'DBIx::Class::Storage::Statistics' => { skip => 1 }, + 'DBIx::Class::Storage::DBI::Replicated::Types' => { skip => 1 }, # test some specific components whose parents are exempt below 'DBIx::Class::Storage::DBI::Replicated*' => {},