normalize changelog formatting
[p5sagit/local-lib.git] / t / classmethod.t
index 5493874..6c001b7 100644 (file)
@@ -1,6 +1,7 @@
 use strict;
 use warnings;
-use Test::More tests => 4;;
+use Test::More tests => 5;
+use File::Temp;
 
 use local::lib ();
 
@@ -18,7 +19,10 @@ my $c = 'local::lib';
 }
 
 {
-    File::Path::rmtree('t/var/splat');
-    $c->ensure_dir_structure_for('t/var/splat');
-    ok(-d 't/var/splat');
+    my $warn = '';
+    local $SIG{__WARN__} = sub { $warn .= $_[0] };
+    my $dir = File::Temp::tempdir();
+    $c->ensure_dir_structure_for("$dir/splat");
+    ok(-d "$dir/splat");
+    like($warn, qr/^Attempting to create directory/);
 }