From: Yuval Kogman Date: Sun, 22 Jun 2008 01:08:39 +0000 (+0000) Subject: Test::TempDir X-Git-Tag: 0.14~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cfd008fa25b3cdd9721ef2fad9f4383cdc200ddc;p=gitmo%2FMooseX-Storage.git Test::TempDir --- diff --git a/Changes b/Changes index 13d9b78..dab836b 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,10 @@ Revision history for MooseX-Storage of stringified object, which broke for any overloaded objects (Thanks to Jonathan Rockway) + * Don't fail tests when YAML is unavailable + + * Use temporary files in test suite, instead of cwd + 0.13 Sat. May 24, 2008 * MooseX::Storage::Engine - added find_type_handler_for($name) method diff --git a/Makefile.PL b/Makefile.PL index 00dc1db..fb95324 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -33,7 +33,7 @@ feature 'File', build_requires 'Test::More' => '0.42'; build_requires 'Test::Deep' => '0'; build_requires 'Test::Exception' => '0'; -build_requires 'File::Temp' => '0'; +build_requires 'Test::TempDir' => '0.02'; auto_install; WriteAll; diff --git a/t/002_basic_io.t b/t/002_basic_io.t index 272f43a..06a3322 100644 --- a/t/002_basic_io.t +++ b/t/002_basic_io.t @@ -4,9 +4,11 @@ use strict; use warnings; use Test::More; -use File::Temp qw(tempdir); +use Test::TempDir; + use File::Spec::Functions; -my $dir = tempdir( CLEANUP => 1 ); + +my $dir = tempdir; BEGIN { eval "use JSON::Any"; diff --git a/t/061_basic_deferred_w_io.t b/t/061_basic_deferred_w_io.t index cf68d08..512c97e 100644 --- a/t/061_basic_deferred_w_io.t +++ b/t/061_basic_deferred_w_io.t @@ -4,9 +4,10 @@ use strict; use warnings; use Test::More; -use File::Temp qw(tempdir); +use Test::TempDir; use File::Spec::Functions; -my $dir = tempdir( CLEANUP => 1 ); + +my $dir = tempdir; BEGIN { eval "use IO::AtomicFile"; diff --git a/t/100_io.t b/t/100_io.t index 3e44027..8874409 100644 --- a/t/100_io.t +++ b/t/100_io.t @@ -4,8 +4,9 @@ use strict; use warnings; use Test::More; -use File::Temp qw(tempdir); +use Test::TempDir; use File::Spec::Functions; +my $dir = tempdir; BEGIN { eval "use JSON::Any"; @@ -29,7 +30,6 @@ BEGIN { has 'object' => (is => 'ro', isa => 'Object'); } -my $dir = tempdir( CLEANUP => 1 ); my $file = catfile( $dir, 'temp.json' ); { diff --git a/t/105_io_atomic_w_utf8.t b/t/105_io_atomic_w_utf8.t index d14a865..d831409 100644 --- a/t/105_io_atomic_w_utf8.t +++ b/t/105_io_atomic_w_utf8.t @@ -4,9 +4,9 @@ use strict; use warnings; use Test::More; -use File::Temp qw(tempdir); +use Test::TempDir; use File::Spec::Functions; -my $dir = tempdir( CLEANUP => 1 ); +my $dir = tempdir; BEGIN { eval "use IO::AtomicFile";