Fixup possible crlf in generated files
[dbsrgits/DBIx-Class.git] / t / storage / dbi_env.t
index f5275c3..fd5f1d6 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/perl
 use strict;
 use warnings;
 use lib qw(t/lib);
@@ -8,9 +7,10 @@ use Test::Exception;
 
 BEGIN { delete @ENV{qw(DBI_DSN DBI_DRIVER)} }
 
-my $schema;
+$ENV{DBICTEST_LOCK_HOLDER} = -1;
 
-DBICTest->init_schema(sqlite_use_file => 1);
+# pre-populate
+my $schema = DBICTest->init_schema(sqlite_use_file => 1);
 
 my $dbname = DBICTest->_sqlite_dbname(sqlite_use_file => 1);
 
@@ -70,7 +70,7 @@ $schema = DBICTest::Schema->connect("dbi::$dbname");
 lives_ok { count_sheep($schema) } 'SQLite in DBI_DRIVER';
 isa_ok $schema->storage, 'DBIx::Class::Storage::DBI::SQLite';
 
-undef $ENV{DBI_DRIVER};
+delete $ENV{DBI_DRIVER};
 $ENV{DBI_DSN} = "dbi:SQLite:$dbname";
 $schema = DBICTest::Schema->connect;
 lives_ok { count_sheep($schema) } 'SQLite in DBI_DSN';