use DBICTest;
use Path::Class;
use Data::Dumper;
+ use Test::TempDir::Tiny;
use IO::All;
+
+ my $tempdir = tempdir;
use if $^O eq 'MSWin32','Devel::Confess';
-plan tests => 16;
+plan tests => 18;
# set up and populate schema
- ok(my $schema = DBICTest->init_schema( ), 'got schema');
+ ok(my $schema = DBICTest->init_schema(db_dir => $tempdir, ), 'got schema');
my $config_dir = io->catfile(qw't var configs')->name;
- my $fixture_dir = io->catfile(qw't var fixtures')->name;
+ my $fixture_dir = $tempdir;
# do dump
{
my $self = shift;
my %args = @_;
- my $db_file = "t/var/DBIxClass.db";
+ my $db_file
+ = $args{db_dir}
+ ? "$args{db_dir}/DBIxClass.db"
+ : "t/var/DBIxClass.db"
+ ;
mkdir("t/var") unless -d "t/var";
if ( !$args{no_deploy} ) {
[ 32948, 'Big PK' ],
]);
+ $schema->populate('Artist::WashedUp', [
+ [ qw/fk_artistid/ ],
+ [ 2 ],
+ ]);
+
$schema->populate('CD', [
[ qw/cdid artist title year/ ],
[ 1, 1, "Spoonful of bees", 1999 ],