Reshuffle Makefile.PL a bit and add parallel-testing exception
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Plain.pm
CommitLineData
c6d74d3e 1package # hide from PAUSE
2 DBICTest::Plain;
50041f3c 3
4use strict;
5use warnings;
1752dc15 6use base qw/DBIx::Class::Schema/;
50041f3c 7use DBI;
8
9my $db_file = "t/var/Plain.db";
10
11unlink($db_file) if -e $db_file;
12unlink($db_file . "-journal") if -e $db_file . "-journal";
13mkdir("t/var") unless -d "t/var";
14
15my $dsn = "dbi:SQLite:${db_file}";
16
fc69fea6 17__PACKAGE__->load_classes("Test");
77d76d0f 18my $schema = __PACKAGE__->compose_connection(
19 __PACKAGE__,
20 $dsn,
21 undef,
22 undef,
23 { AutoCommit => 1 }
24);
50041f3c 25
26my $dbh = DBI->connect($dsn);
27
28my $sql = <<EOSQL;
29CREATE TABLE test (
30 id INTEGER NOT NULL,
31 name VARCHAR(32) NOT NULL
32);
33
34INSERT INTO test (id, name) VALUES (1, 'DBIC::Plain is broken!');
35
36EOSQL
37
38$dbh->do($_) for split(/\n\n/, $sql);
39
401;