Centralize remaining uses of Sub::Name within _Util
[dbsrgits/DBIx-Class.git] / t / icdt / engine_specific / sqlite.t
index 8a152ab..1bee9d6 100644 (file)
@@ -1,4 +1,5 @@
-use DBIx::Class::Optional::Dependencies -skip_all_without => qw( icdt test_rdbms_sqlite );
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt test_rdbms_sqlite );
 
 use strict;
 use warnings;
@@ -6,7 +7,7 @@ use warnings;
 use Test::More;
 use Test::Warn;
 use Try::Tiny;
-use lib qw(t/lib);
+
 use DBICTest;
 
 # Test offline parser determination (formerly t/inflate/datetime_determine_parser.t)
@@ -17,10 +18,15 @@ use DBICTest;
 
   my $storage = $schema->storage;
 
-  is(
-    ref $storage, 'DBIx::Class::Storage::DBI',
-    'Starting with generic storage'
-  );
+  if( $storage->isa('DBIx::Class::Storage::DBI::Replicated') ) {
+    $storage = $storage->master;
+  }
+  else {
+    is(
+      ref $storage, 'DBIx::Class::Storage::DBI',
+      'Starting with generic storage'
+    );
+  }
 
   # Calling date_time_parser should cause the storage to be reblessed,
   # so that we can pick up datetime_parser_type from subclasses