Commit | Line | Data |
---|---|---|
1c339d71 | 1 | package DBICTest; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | use DBICTest::Schema; | |
6 | ||
7 | sub initialise { | |
8 | ||
9 | my $db_file = "t/var/DBIxClass.db"; | |
10 | ||
11 | unlink($db_file) if -e $db_file; | |
12 | unlink($db_file . "-journal") if -e $db_file . "-journal"; | |
13 | mkdir("t/var") unless -d "t/var"; | |
14 | ||
15 | my $dsn = "dbi:SQLite:${db_file}"; | |
16 | ||
17 | return DBICTest::Schema->compose_connection('DBICTest' => $dsn); | |
18 | } | |
19 | ||
510ca912 | 20 | 1; |