Only load DBICTest::Schema when needed in tests
[dbsrgits/DBIx-Class.git] / t / inflate / datetime_mssql.t
index ae97a46..862aa7f 100644 (file)
@@ -29,13 +29,6 @@ plan skip_all => 'Test needs ' .
     $dsn3 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mssql_ado'))
       or (not $dsn || $dsn2 || $dsn3);
 
-# use this if you keep a copy of DBD::Sybase linked to FreeTDS somewhere else
-BEGIN {
-  if (my $lib_dirs = $ENV{DBICTEST_MSSQL_PERL5LIB}) {
-    unshift @INC, $_ for split /:/, $lib_dirs;
-  }
-}
-
 if (not ($dsn || $dsn2 || $dsn3)) {
   plan skip_all =>
     'Set $ENV{DBICTEST_MSSQL_ODBC_DSN} and/or $ENV{DBICTEST_MSSQL_DSN} and/or '
@@ -44,6 +37,7 @@ if (not ($dsn || $dsn2 || $dsn3)) {
     ." 'track'.";
 }
 
+require DBICTest::Schema;
 DBICTest::Schema->load_classes('EventSmallDT');
 
 my @connect_info = (
@@ -60,7 +54,7 @@ for my $connect_info (@connect_info) {
 
   next unless $dsn;
 
-  $schema = DBICTest::Schema->connect($dsn, $user, $pass, {
+  $schema = DBICTest->connect_schema($dsn, $user, $pass, {
     on_connect_call => 'datetime_setup'
   });