use Test::Exception;
use lib qw(t/lib);
use DBICTest;
+use DBICTest::Schema;
+use Scalar::Util ();
BEGIN {
require DBIx::Class::Storage::DBI;
if not DBIx::Class::Storage::DBI->_sqlt_version_ok;
}
+# Test for SQLT-related leaks
+{
+ my $s = DBICTest::Schema->clone;
+ my $sqlt_s = create_schema ({ schema => $s });
+ Scalar::Util::weaken ($s);
+
+ ok (!$s, 'Schema not leaked');
+}
+
+
my $schema = DBICTest->init_schema();
# Dummy was yanked out by the sqlt hook test
# CustomSql tests the horrific/deprecated ->name(\$sql) hack
my $args = shift || {};
if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
- $schema->deploy($args);
+ $schema->deploy($args);
} else {
open IN, "t/lib/sqlite.sql";
my $sql;