10 # Set up the "usual" sqlite for DBICTest
11 my $normal_schema = DBICTest->init_schema( sqlite_use_file => 1 );
13 # Steal the dsn, which should be like 'dbi:SQLite:t/var/DBIxClass.db'
14 my $normal_dsn = $normal_schema->storage->_dbi_connect_info->[0];
16 # Make sure we have no active connection
17 $normal_schema->storage->disconnect;
19 # Make a new clone with a new connection, using a code reference
20 my $code_ref_schema = $normal_schema->connect(sub { DBI->connect($normal_dsn); });
22 # Stolen from 60core.t - this just verifies things seem to work at all
23 my @art = $code_ref_schema->resultset("Artist")->search({ }, { order_by => 'name DESC'});
24 cmp_ok(@art, '==', 3, "Three artists returned");