Browse files

Move test suite cleanup from runtests to a test file

  • Loading branch information...
1 parent 6308c61 commit d0ba72a06f97e01899e77df749439497a8d4a462 @niner committed Jul 24, 2010
Showing with 13 additions and 4 deletions.
  1. +0 −4 runtests
  2. +13 −0 t/00prepare.t
View
4 runtests
@@ -1,9 +1,5 @@
#!/bin/sh
-# cleanup
-rm -Rf root/instances/test.example
-echo 'set client_min_messages='"'"'warning'"'"'; drop schema "test.example" cascade;' | psql cidercms
-
if [ "$1" != "fast" ] && [ "$2" != "fast" ] ; then
export TEST_POD=1
export TEST_AUTHOR=1
View
13 t/00prepare.t
@@ -0,0 +1,13 @@
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+use FindBin qw($Bin);
+use DBI;
+
+ok(system("rm -Rf $Bin/../root/instances/test.example") == 0);
+
+my $dbh = DBI->connect('dbi:Pg:database=cidercms');
+
+ok($dbh->do(q{set client_min_messages='warning'}));
+ok($dbh->do(q{drop schema if exists "test.example" cascade}));

0 comments on commit d0ba72a

Please sign in to comment.