13 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('deploy')
14 unless DBIx::Class::Optional::Dependencies->req_ok_for ('deploy')
18 use Path::Class qw/dir/;
19 use File::Path qw/make_path remove_tree/;
22 my $parse_schema = DBICTest->init_schema(no_deploy => 1);
23 $parse_schema->deploy({},'t/lib/test_deploy');
24 $parse_schema->resultset("Artist")->all();
25 }, 'artist table deployed correctly' );
27 my $schema = DBICTest->init_schema();
29 my $var = dir (qw| t var create_ddl_dir |);
31 or make_path( "$var" )
32 or die "can't create $var: $!";
34 my $test_dir_1 = $var->subdir ('test1', 'foo', 'bar' );
35 remove_tree( "$test_dir_1" ) if -d $test_dir_1;
36 $schema->create_ddl_dir( undef, undef, $test_dir_1 );
38 ok( -d $test_dir_1, 'create_ddl_dir did a make_path on its target dir' );
39 ok( scalar( glob $test_dir_1.'/*.sql' ), 'there are sql files in there' );
42 local $TODO = 'we should probably add some tests here for actual deployability of the DDL?';