Skip to content

Commit

Permalink
Use Carp qw(croak). Die if no tests written (eg bad Test:Database con…
Browse files Browse the repository at this point in the history
…fig).
  • Loading branch information
timbunce committed Feb 10, 2014
1 parent 29e8d41 commit 6eebc8a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions sandbox/tim/tumbler.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ =head1 prototype playground for exploring DBI Test design issues
use File::Path;
use File::Basename;
use Data::Dumper;
use Carp qw(croak);

use lib 'lib';

Expand Down Expand Up @@ -60,6 +61,14 @@ =head1 prototype playground for exploring DBI Test design issues
Context->new,
);

die "No tests written!\n"
unless -d $output_dir;

exit 0;


# ------


sub get_input_tests {
my ($template_dir) = @_;
Expand Down Expand Up @@ -116,9 +125,6 @@ sub write_test_file {
}


exit 0;


# ------


Expand Down Expand Up @@ -179,7 +185,7 @@ sub dbd_settings_provider {

my @tdb_handles = Test::Database->handles({ dbd => $driver });
unless (@tdb_handles) {
warn_once("Skipped $driver driver - no Test::Database dsn config using the $driver driver\n");
warn_once("Skipped DBD::$driver - no Test::Database dsn config using the $driver driver\n");
return;
}
#warn Dumper \@tdb_handles;
Expand Down

0 comments on commit 6eebc8a

Please sign in to comment.