X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02-instantiation-no-ddl.t;h=1948051fe2dd29af08e62ef27bf06c9a0036fd41;hb=e336b016fe92c5e4a7a7d5a91bee8e0f6f8ef5c2;hp=ff169c3b0b3053c681773257778cc4f114747f59;hpb=cc7c22d91ae04a0c35f4a713521e58074149ccc3;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/t/02-instantiation-no-ddl.t b/t/02-instantiation-no-ddl.t index ff169c3..1948051 100644 --- a/t/02-instantiation-no-ddl.t +++ b/t/02-instantiation-no-ddl.t @@ -11,11 +11,11 @@ use aliased 'DBIx::Class::DeploymentHandler', 'DH'; use File::Path 'remove_tree'; use Test::More; use Test::Exception; +use DBI; DBICDHTest::ready; - -my $db = 'dbi:SQLite:db.db'; -my @connection = ($db, '', '', { ignore_version => 1 }); +my $dbh = DBI->connect('dbi:SQLite::memory:'); +my @connection = (sub { $dbh }, { ignore_version => 1 }); my $sql_dir = 't/sql'; VERSION1: { @@ -27,14 +27,14 @@ VERSION1: { ignore_ddl => 1, script_directory => $sql_dir, schema => $s, - databases => 'SQLite', + databases => [], sql_translator_args => { add_drop_table => 0 }, }); 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({ @@ -61,13 +61,13 @@ VERSION2: { ignore_ddl => 1, script_directory => $sql_dir, schema => $s, - databases => 'SQLite', + databases => [], }); ok($handler, 'DBIx::Class::DeploymentHandler w/2 instantiates correctly'); my $version = $s->schema_version(); - $handler->prepare_deploy(); + $handler->prepare_install; dies_ok { $s->resultset('Foo')->create({ bar => 'frew', @@ -98,13 +98,13 @@ VERSION3: { ignore_ddl => 1, script_directory => $sql_dir, schema => $s, - databases => 'SQLite', + databases => [], }); ok($handler, 'DBIx::Class::DeploymentHandler w/3 instantiates correctly'); my $version = $s->schema_version(); - $handler->prepare_deploy; + $handler->prepare_install; dies_ok { $s->resultset('Foo')->create({ bar => 'frew', @@ -131,7 +131,7 @@ DOWN2: { ignore_ddl => 1, script_directory => $sql_dir, schema => $s, - databases => 'SQLite', + databases => [], }); ok($handler, 'DBIx::Class::DeploymentHandler w/2 instantiates correctly');