From: Peter Rabbitson Date: Fri, 20 Apr 2012 07:29:34 +0000 (+0200) Subject: Fix test borkage after 9b871b00c - ALWAYS RUN TESTS RETARDO! X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=851437691480515dfef50e5e170b77ff51d07620;p=dbsrgits%2FDBIx-Class-Historic.git Fix test borkage after 9b871b00c - ALWAYS RUN TESTS RETARDO! --- diff --git a/t/admin/10script.t b/t/admin/10script.t index 575e3a6..8572ca1 100644 --- a/t/admin/10script.t +++ b/t/admin/10script.t @@ -69,7 +69,7 @@ sub test_dbicadmin { my ($perl) = $^X =~ /(.*)/; - open(my $fh, "-|", ( $perl, 'script/dbicadmin', default_args(), qw|--op=select --attrs={"order_by":"name"}| ) ) or die $!; + open(my $fh, "-|", ( $perl, '-MDBICTest::RunMode', 'script/dbicadmin', default_args(), qw|--op=select --attrs={"order_by":"name"}| ) ) or die $!; my $data = do { local $/; <$fh> }; close($fh); if (!ok( ($data=~/Aran.*Trout/s), "$ENV{JSON_ANY_ORDER}: select with attrs" )) { @@ -108,5 +108,5 @@ sub test_exec { } } - system ($perl, @args); + system ($perl, '-MDBICTest::RunMode', @args); } diff --git a/t/lib/DBICTest/RunMode.pm b/t/lib/DBICTest/RunMode.pm index 7611e4c..868183f 100644 --- a/t/lib/DBICTest/RunMode.pm +++ b/t/lib/DBICTest/RunMode.pm @@ -26,7 +26,7 @@ _check_author_makefile() unless $ENV{DBICTEST_NO_MAKEFILE_VERIFICATION}; # https://rt.cpan.org/Ticket/Display.html?id=76663 my $tmpdir; sub tmpdir { - $tmpdir ||= do { + dir ($tmpdir ||= do { my $dir = dir(File::Spec->tmpdir); @@ -40,8 +40,8 @@ sub tmpdir { $dir->mkpath; } - $dir; - }; + $dir->stringify; + }); }