X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Fstorage%2Fdeploy.t;h=d2bca4352a1daaceb26ba53f508e6704546f0273;hp=e6ccd2d9c8d7d19fc0a3e6572638fa2ae10fb1a7;hb=076be7c46559c6c27b70946893e2f82d1ff4e0a0;hpb=0424d17af479679e643a7600078c310a032f46fd diff --git a/t/storage/deploy.t b/t/storage/deploy.t index e6ccd2d..d2bca43 100644 --- a/t/storage/deploy.t +++ b/t/storage/deploy.t @@ -14,20 +14,20 @@ BEGIN { } use File::Spec; -use File::Path qw/ mkpath rmtree /; - +use Path::Class qw/dir/; +use File::Path qw/make_path remove_tree/; my $schema = DBICTest->init_schema(); -my $var = File::Spec->catfile(qw| t var create_ddl_dir |); +my $var = dir (qw| t var create_ddl_dir |); -d $var - or mkpath($var) - or die "can't create $var"; + or make_path( "$var" ) + or die "can't create $var: $!"; -my $test_dir_1 = File::Spec->catdir( $var, 'test1', 'foo', 'bar' ); -rmtree( $test_dir_1 ) if -d $test_dir_1; +my $test_dir_1 = $var->subdir ('test1', 'foo', 'bar' ); +remove_tree( "$test_dir_1" ) if -d $test_dir_1; $schema->create_ddl_dir( undef, undef, $test_dir_1 ); -ok( -d $test_dir_1, 'create_ddl_dir did a mkpath on its target dir' ); +ok( -d $test_dir_1, 'create_ddl_dir did a make_path on its target dir' ); ok( scalar( glob $test_dir_1.'/*.sql' ), 'there are sql files in there' ); TODO: {