From: Graham Knop Date: Sat, 30 Nov 2013 04:34:41 +0000 (-0500) Subject: don't assume File::Path will be loaded in tests X-Git-Tag: v2.000_000~57 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac3d09d610a83d54ae669f514b75d330df30da11;p=p5sagit%2Flocal-lib.git don't assume File::Path will be loaded in tests --- diff --git a/t/classmethod.t b/t/classmethod.t index 5493874..c066ca1 100644 --- a/t/classmethod.t +++ b/t/classmethod.t @@ -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"); }