Fix issue with test when Best isn't available
[gitmo/MooseX-Storage.git] / t / 105_io_atomic_w_utf8.t
index 6da8d3e..d831409 100644 (file)
@@ -4,6 +4,9 @@ use strict;
 use warnings;
 
 use Test::More;
+use Test::TempDir;
+use File::Spec::Functions;
+my $dir = tempdir;
 
 BEGIN {  
     eval "use IO::AtomicFile";
@@ -39,7 +42,7 @@ use utf8;
     );
 }
 
-my $file = 'temp.json';
+my $file = catfile($dir, 'temp.json');
 
 {
     my $foo = Foo->new;
@@ -81,4 +84,3 @@ unlink $file;
       '... got the string we expected');
 }
 
-unlink $file;