6 use Path::Class qw/dir/;
14 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('deploy')
15 unless DBIx::Class::Optional::Dependencies->req_ok_for ('deploy')
18 # this is how maint/gen_schema did it (connect() to force a storage
19 # instance, but no conninfo)
20 # there ought to be more code like this in the wild
22 DBICTest::Schema->connect->deployment_statements('SQLite'),
27 my $parse_schema = DBICTest->init_schema(no_deploy => 1);
28 $parse_schema->deploy({},'t/lib/test_deploy');
29 $parse_schema->resultset("Artist")->all();
30 }, 'artist table deployed correctly' );
32 my $schema = DBICTest->init_schema();
34 my $var = dir ("t/var/ddl_dir-$$");
35 $var->mkpath unless -d $var;
37 my $test_dir_1 = $var->subdir ('test1', 'foo', 'bar' );
38 $test_dir_1->rmtree if -d $test_dir_1;
39 $schema->create_ddl_dir( undef, undef, $test_dir_1 );
41 ok( -d $test_dir_1, 'create_ddl_dir did a make_path on its target dir' );
42 ok( scalar( glob $test_dir_1.'/*.sql' ), 'there are sql files in there' );
45 local $TODO = 'we should probably add some tests here for actual deployability of the DDL?';