From: Arthur Axel 'fREW' Schmidt Date: Thu, 25 Feb 2010 00:03:09 +0000 (-0600) Subject: git rid of some unnecesary test warnings X-Git-Tag: v0.001000_01~126 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-DeploymentHandler.git;a=commitdiff_plain;h=9d737292631c7149ccf16d34d261ef2fa1949b15 git rid of some unnecesary test warnings --- diff --git a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm index cef904b..85b85f8 100644 --- a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm +++ b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm @@ -11,7 +11,6 @@ has deploy_method => ( lazy_build => 1, handles => [qw{ deployment_statements - deploy create_install_ddl create_update_ddl create_ddl_dir diff --git a/t/02-instantiation.t b/t/02-instantiation.t index 60d5216..4efc955 100644 --- a/t/02-instantiation.t +++ b/t/02-instantiation.t @@ -10,7 +10,11 @@ my $db = 'dbi:SQLite:db.db'; my $sql_dir = 't/sql'; unlink 'db.db' if -e 'db.db'; -mkdir 't/sql' unless -d 't/sql'; +if (-d 't/sql') { + unlink $_ for glob('t/sql/*'); +} else { + mkdir 't/sql'; +} VERSION1: { use_ok 'DBICVersion_v1'; @@ -25,7 +29,7 @@ VERSION1: { ok($handler, 'DBIx::Class::DeploymentHandler w/1.0 instantiates correctly'); my $version = $s->schema_version(); - $handler->create_ddl_dir( $version, 0); + $handler->create_install_ddl(); ok(-e 't/sql/DBICVersion-Schema-1.0-SQLite.sql', 'DDL for 1.0 got created successfully'); dies_ok { @@ -54,8 +58,8 @@ VERSION2: { ok($handler, 'DBIx::Class::DeploymentHandler w/2.0 instantiates correctly'); $version = $s->schema_version(); - $handler->create_ddl_dir($version, 0); - $handler->create_ddl_dir($version, '1.0'); + $handler->create_install_ddl(); + $handler->create_update_ddl($version, '1.0'); ok(-e 't/sql/DBICVersion-Schema-2.0-SQLite.sql', 'DDL for 2.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-1.0-2.0-SQLite.sql', 'DDL for migration from 1.0 to 2.0 got created successfully'); dies_ok { @@ -93,9 +97,9 @@ VERSION3: { ok($handler, 'DBIx::Class::DeploymentHandler w/3.0 instantiates correctly'); $version = $s->schema_version(); - $handler->create_ddl_dir( $version, 0); - $handler->create_ddl_dir( $version, '1.0'); - $handler->create_ddl_dir( $version, '2.0'); + $handler->create_install_ddl; + $handler->create_update_ddl( $version, '1.0'); + $handler->create_update_ddl( $version, '2.0'); ok(-e 't/sql/DBICVersion-Schema-3.0-SQLite.sql', 'DDL for 3.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-1.0-3.0-SQLite.sql', 'DDL for migration from 1.0 to 3.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-2.0-3.0-SQLite.sql', 'DDL for migration from 2.0 to 3.0 got created successfully');