From: Errietta Kostala Date: Wed, 28 Jan 2015 16:14:36 +0000 (+0000) Subject: Check if the dir exists before getting rid of it X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2Fstemmaweb.git;a=commitdiff_plain;h=f465f00435d4205c666cdbffe2a204a867bb2384 Check if the dir exists before getting rid of it --- diff --git a/t/07google.t b/t/07google.t index 37d7d74..7816957 100644 --- a/t/07google.t +++ b/t/07google.t @@ -27,7 +27,7 @@ LWP::Protocol::PSGI->register(stemmaweb->psgi_app); my $ua = Test::WWW::Mechanize->new; -io("$FindBin::Bin/var")->rmtree; +io("$FindBin::Bin/var")->rmtree if io("$FindBin::Bin/var")->exists; { my $scope = $dir->new_scope; @@ -222,6 +222,6 @@ io("$FindBin::Bin/var")->rmtree; $ua->content_contains('Hello! 4242!', 'We are logged in.'); } -io("$FindBin::Bin/var")->rmtree; +io("$FindBin::Bin/var")->rmtree if io("$FindBin::Bin/var")->exists; done_testing;