change all the tests to use the new test schema namespace
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / deploy_methods / sql_translator_protoschema_transform.t
index ef0e5a3..a37aab5 100644 (file)
@@ -1,5 +1,8 @@
 #!perl
 
+use strict;
+use warnings;
+
 use Test::More;
 use Test::Exception;
 
@@ -9,15 +12,15 @@ use aliased 'DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator';
 use File::Spec::Functions;
 use File::Path qw(rmtree mkpath);
 
-my $db = 'dbi:SQLite:db.db';
-my @connection = ($db, '', '', { ignore_version => 1 });
+my $dbh = DBICDHTest::dbh();
+my @connection = (sub { $dbh }, { ignore_version => 1 });
 my $sql_dir = 't/sql';
 
 DBICDHTest::ready;
 
 VERSION1: {
    use_ok 'DBICVersion_v1';
-   my $s = DBICVersion::Schema->connect(@connection);
+   my $s = DBICVersion::Schema1->connect(@connection);
    my $dm = Translator->new({
       schema            => $s,
       script_directory => $sql_dir,
@@ -31,7 +34,7 @@ VERSION1: {
 
 VERSION2: {
    use_ok 'DBICVersion_v2';
-   my $s = DBICVersion::Schema->connect(@connection);
+   my $s = DBICVersion::Schema2->connect(@connection);
    my $dm = Translator->new({
       schema            => $s,
       script_directory => $sql_dir,
@@ -40,7 +43,6 @@ VERSION2: {
       txn_wrap          => 1,
    });
 
-   $version = $s->schema_version();
    $dm->prepare_deploy;
    mkpath(catfile(qw( t sql _preprocess_schema upgrade 1.0-2.0 )));
    open my $prerun, '>',