diff options
author | Jonathan "Duke" Leto <jonathan@leto.net> | 2011-04-27 16:38:46 -0700 |
---|---|---|
committer | Jonathan "Duke" Leto <jonathan@leto.net> | 2011-04-27 16:38:46 -0700 |
commit | ce73871740887aced0c612c70a83359553ad8f36 (patch) | |
tree | 3d0c03aa659282a4b971f805daa3d6cdf9764ab2 /t/lib/jitterbug | |
parent | Fix readme markdown and add note about using cpanm to install deps (diff) | |
download | jitterbug-ce73871740887aced0c612c70a83359553ad8f36.tar.gz |
Make jitterbug::Test look for jitterbug.db in the correct place and TODO another test to make the test suite pass
Diffstat (limited to 't/lib/jitterbug')
-rw-r--r-- | t/lib/jitterbug/Test.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/lib/jitterbug/Test.pm b/t/lib/jitterbug/Test.pm index ee6a13d..2326e83 100644 --- a/t/lib/jitterbug/Test.pm +++ b/t/lib/jitterbug/Test.pm @@ -10,12 +10,13 @@ use File::Spec; use File::Temp qw/tempdir/; sub init { - my $db_dir = tempdir( CLEANUP => 1 ); - my $db_file = File::Spec->catfile( $db_dir, 'jitterbug.db' ); + #my $db_dir = tempdir( CLEANUP => 1 ); + # TODO: this should be pulled from the config file + my $db_file = File::Spec->catfile( qw/t data jitterbug.db/ ); my $dsn = 'dbi:SQLite:dbname=' . $db_file; my $schema = jitterbug::Schema->connect($dsn); _setting($dsn); - $schema->deploy; + $schema->deploy unless -s $db_file; } sub _setting { |