X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02-instantiation.t;h=f5b18a5b9b61f490609332086146e6a360c6ad94;hb=2482377b70d4cfe36925a534c60c76898878601a;hp=36e8e4fc774c59e8af02aeb3ca1756d230ef7952;hpb=91adde755e5808a1ec12bcf00e683e3754964cc9;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/t/02-instantiation.t b/t/02-instantiation.t index 36e8e4f..f5b18a5 100644 --- a/t/02-instantiation.t +++ b/t/02-instantiation.t @@ -10,13 +10,12 @@ use aliased 'DBIx::Class::DeploymentHandler', 'DH'; use File::Path 'remove_tree'; use Test::More; -use Test::Exception; +use File::Temp 'tempdir'; +use Test::Fatal qw(lives_ok dies_ok); -DBICDHTest::ready; - -my $db = 'dbi:SQLite:db.db'; -my @connection = ($db, '', '', { ignore_version => 1 }); -my $sql_dir = 't/sql'; +my $dbh = DBICDHTest::dbh(); +my @connection = (sub { $dbh }, { ignore_version => 1 }); +my $sql_dir = tempdir( CLEANUP => 1 ); VERSION1: { use_ok 'DBICVersion_v1'; @@ -33,7 +32,7 @@ VERSION1: { ok($handler, 'DBIx::Class::DeploymentHandler w/1 instantiates correctly'); my $version = $s->schema_version; - $handler->prepare_deploy; + $handler->prepare_install; dies_ok { $s->resultset('Foo')->create({ @@ -65,7 +64,7 @@ VERSION2: { ok($handler, 'DBIx::Class::DeploymentHandler w/2 instantiates correctly'); my $version = $s->schema_version(); - $handler->prepare_deploy(); + $handler->prepare_install; $handler->prepare_upgrade({ from_version => 1, to_version => $version} ); dies_ok { $s->resultset('Foo')->create({ @@ -102,7 +101,7 @@ VERSION3: { ok($handler, 'DBIx::Class::DeploymentHandler w/3 instantiates correctly'); my $version = $s->schema_version(); - $handler->prepare_deploy; + $handler->prepare_install; $handler->prepare_upgrade({ from_version => 2, to_version => $version }); dies_ok { $s->resultset('Foo')->create({