X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F04-preconnect.t;h=d265dc2b0ff150bdcbbea94980f50aa09f9ad8f6;hb=f482cb0d5d080d4be2b2a4784edf55f8cff68a69;hp=9d9cded85558111e4d44f6b6eaca38994d13b4d7;hpb=624e3018cef977b18efce156c40440aa50d26e09;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/t/04-preconnect.t b/t/04-preconnect.t index 9d9cded..d265dc2 100644 --- a/t/04-preconnect.t +++ b/t/04-preconnect.t @@ -8,15 +8,13 @@ use DBICDHTest; use DBIx::Class::DeploymentHandler; use aliased 'DBIx::Class::DeploymentHandler', 'DH'; -use File::Path qw(remove_tree mkpath); +use Path::Class 'dir'; use Test::More; -use Test::Exception; - -DBICDHTest::ready; +use File::Temp 'tempdir'; my $db = 'dbi:SQLite::memory:'; my @connection = ($db, '', '', { ignore_version => 1, on_connect_do => sub { die }}); -my $sql_dir = 't/sql'; +my $sql_dir = tempdir( CLEANUP => 1 ); VERSION1: { use_ok 'DBICVersion_v1'; @@ -33,7 +31,7 @@ VERSION1: { ok !$s->storage->connected, 'creating handler did not connect'; ok($handler, 'DBIx::Class::DeploymentHandler w/1 instantiates correctly'); - mkpath('t/sql/SQLite/initialize/1'); + dir($sql_dir, qw(SQLite initialize 1))->mkpath; $handler->initialize({ version => 1, storage_type => 'SQLite' }); ok !$s->storage->connected, 'creating schema did not connect'; }