From: Yuval Kogman <nothingmuch@woobling.org>
Date: Wed, 16 Apr 2008 00:55:42 +0000 (+0000)
Subject: unlink the DBM::Deep file at BEGIN time too to prevent failure after an interrupted run
X-Git-Tag: 0_55~220
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f051d5873315b99bfe3a6dd0eae8a1d4f509444;p=gitmo%2FMoose.git

unlink the DBM::Deep file at BEGIN time too to prevent failure after an interrupted run
---

diff --git a/t/200_examples/002_example_Moose_POOP.t b/t/200_examples/002_example_Moose_POOP.t
index f7b5f81..0298123 100644
--- a/t/200_examples/002_example_Moose_POOP.t
+++ b/t/200_examples/002_example_Moose_POOP.t
@@ -16,6 +16,15 @@ BEGIN {
 use Test::Exception;
 
 BEGIN {
+    # in case there are leftovers
+    unlink('newswriter.db') if -e 'newswriter.db';
+}
+
+END {
+    unlink('newswriter.db') if -e 'newswriter.db';
+}
+
+BEGIN {
     use_ok('Moose');           
 }
 
@@ -429,4 +438,3 @@ Moose::POOP::Meta::Instance->_reload_db();
     
 }
 
-unlink('newswriter.db') if -e 'newswriter.db';
\ No newline at end of file