#!/usr/bin/perl -w
use Test::More;
use Data::Dumper;
-use lib 'ex'; # Where BeerDB should live
+use DBI;
+use lib 'examples'; # Where BeerDB should live
BEGIN {
- plan tests => 65;
+ my $drh = eval {
+ DBI->install_driver("mysql");
+ my @databases = DBI->data_sources("mysql");
+ die "couldn't connect to mysql" unless (@databases);
+ };
+ warn "error : $@ \n" if ($@);
+ my $testcount = ($@) ? 45 : 65 ;
+ plan tests => $testcount;
}
$db = 'test';