use lib qw(t/lib);
use ExtraTest::Schema;
+use Test::TempDir::Tiny;
use IO::All;
+my $tempdir = tempdir;
+
(my $schema = ExtraTest::Schema->connect(
'DBI:SQLite::memory:','',''))->init_schema;
$fixtures->dump({
config => 'extra.json',
schema => $schema,
- directory => io->catfile(qw"t var fixtures photos")->name }),
+ directory => io->catfile($tempdir, qw" photos")->name }),
'fetch dump executed okay');
ok my $key = $schema->resultset('Photo')->first->file;
$fixtures->populate({
no_deploy => 1,
schema => $schema,
- directory => io->catfile(qw"t var fixtures photos")->name}),
+ directory => io->catfile($tempdir, qw" photos")->name}),
'populated');
is $key, $schema->resultset('Photo')->first->file,
END {
rmtree io->catfile(qw't var files')->name;
- rmtree io->catfile(qw't var fixtures photos')->name;
+ rmtree io->catfile($tempdir, qw'photos')->name;
}