[Bps-public-commit] r18988 - DBIx-CheckConnectivity/t

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 30 21:47:12 EDT 2009


Author: sunnavy
Date: Mon Mar 30 21:47:12 2009
New Revision: 18988

Modified:
   DBIx-CheckConnectivity/t/00.load.t

Log:
update 00.load.t

Modified: DBIx-CheckConnectivity/t/00.load.t
==============================================================================
--- DBIx-CheckConnectivity/t/00.load.t	(original)
+++ DBIx-CheckConnectivity/t/00.load.t	Mon Mar 30 21:47:12 2009
@@ -1,11 +1,17 @@
-use Test::More tests => 5;
+use Test::More;
+use File::Spec::Functions qw/catfile catdir/;
+use File::Basename qw( dirname );
 
-BEGIN {
-use_ok( 'DBIx::CheckConnectivity' );
-use_ok( 'DBIx::CheckConnectivity::Driver' );
-use_ok( 'DBIx::CheckConnectivity::Driver::Pg' );
-use_ok( 'DBIx::CheckConnectivity::Driver::mysql' );
-use_ok( 'DBIx::CheckConnectivity::Driver::SQLite' );
-}
+my $manifest = catdir( dirname(__FILE__), '..', 'MANIFEST' );
+plan skip_all => 'MANIFEST does not exist' unless -e $manifest;
+open my $fh, '<', $manifest;
+
+my @pms = map { s|^lib/||; chomp; $_ } grep { m|^lib/.*pm$| } <$fh>;
 
-diag( "Testing DBIx::CheckConnectivity $DBIx::CheckConnectivity::VERSION" );
+plan tests => scalar @pms;
+for my $pm (@pms) {
+    $pm =~ s|\.pm$||;
+    $pm =~ s|/|::|g;
+
+    use_ok($pm);
+}



More information about the Bps-public-commit mailing list