X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fdeploy.t;h=444bf26c173185c75b545ae73558244159efb951;hb=8d6b1478d8fa6f7c76e313ee72a72d5eb4c24d03;hp=3b9435ba6cef3b6db6c8955ac6589c351d734a4f;hpb=d9bd51956470404b3960871d3413fa98f16961d2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/deploy.t b/t/storage/deploy.t index 3b9435b..444bf26 100644 --- a/t/storage/deploy.t +++ b/t/storage/deploy.t @@ -16,7 +16,6 @@ BEGIN { use File::Spec; use Path::Class qw/dir/; -use File::Path qw/make_path remove_tree/; lives_ok( sub { my $parse_schema = DBICTest->init_schema(no_deploy => 1); @@ -26,13 +25,11 @@ lives_ok( sub { my $schema = DBICTest->init_schema(); -my $var = dir (qw| t var create_ddl_dir |); --d $var - or make_path( "$var" ) - or die "can't create $var: $!"; +my $var = dir ("t/var/ddl_dir-$$"); +$var->mkpath unless -d $var; my $test_dir_1 = $var->subdir ('test1', 'foo', 'bar' ); -remove_tree( "$test_dir_1" ) if -d $test_dir_1; +$test_dir_1->rmtree if -d $test_dir_1; $schema->create_ddl_dir( undef, undef, $test_dir_1 ); ok( -d $test_dir_1, 'create_ddl_dir did a make_path on its target dir' ); @@ -43,4 +40,8 @@ TODO: { ok( 0 ); } +END { + $var->rmtree; +} + done_testing;