don't assume File::Path will be loaded in tests
Graham Knop [Sat, 30 Nov 2013 04:34:41 +0000 (23:34 -0500)]
t/classmethod.t

index 5493874..c066ca1 100644 (file)
@@ -1,6 +1,7 @@
 use strict;
 use warnings;
 use Test::More tests => 4;;
+use File::Temp;
 
 use local::lib ();
 
@@ -18,7 +19,7 @@ my $c = 'local::lib';
 }
 
 {
-    File::Path::rmtree('t/var/splat');
-    $c->ensure_dir_structure_for('t/var/splat');
-    ok(-d 't/var/splat');
+    my $dir = File::Temp::tempdir();
+    $c->ensure_dir_structure_for("$dir/splat");
+    ok(-d "$dir/splat");
 }