added test to check when nothing is found
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest.pm
index 56d511a..2077af3 100755 (executable)
@@ -29,6 +29,7 @@ DBIx::Class.
   my $schema = DBICTest->init_schema(
     no_deploy=>1,
     no_populate=>1,
+    storage_type=>'::DBI::Replicated',
   );
 
 This method removes the test SQLite database in t/var/DBIxClass.db 
@@ -65,7 +66,16 @@ sub init_schema {
 
     my $schema;
 
-    $schema = DBICTest::Schema->compose_namespace('DBICTest');
+    if ($args{compose_connection}) {
+      $schema = DBICTest::Schema->compose_connection(
+                  'DBICTest', $self->_database
+                );
+    } else {
+      $schema = DBICTest::Schema->compose_namespace('DBICTest');
+    }
+    if( $args{storage_type}) {
+       $schema->storage_type($args{storage_type});
+    }
     if ( !$args{no_connect} ) {
       $schema = $schema->connect($self->_database);
       $schema->storage->on_connect_do(['PRAGMA synchronous = OFF']);