Skip to content
This repository
Browse code

Fix test

  • Loading branch information...
commit 26f931e5416eb8b7190300051ae80b57c0bc7ae0 1 parent 018e9a6
Dave Cross authored January 28, 2014

Showing 1 changed file with 9 additions and 3 deletions. Show diff stats Hide diff stats

  1. 12  t/Test/Lystyng/Schema.pm
12  t/Test/Lystyng/Schema.pm
@@ -6,9 +6,15 @@ use Test::More;
6 6
 use lib 'lib';
7 7
 
8 8
 sub check_connect : Test(2) {
9  
-  BAIL_OUT('Missing connection info')
10  
-    unless $ENV{LYSTYNG_DB_SERVER} && $ENV{LYSTYNG_DB_NAME} &&
11  
-           $ENV{LYSTYNG_DB_USER}   && $ENV{LYSTYNG_DB_PASS};
  9
+  my @errors;
  10
+  foreach (qw[LYSTYNG_DB_SERVER LYSTYNG_DB_NAME
  11
+              LYSTYNG_DB_USER LYSTYNG_DB_PASS]) {
  12
+    push @errors, $_ unless defined $ENV{$_};
  13
+  }
  14
+
  15
+  if (@errors) {
  16
+    BAIL_OUT("Missing connection info: @errors");
  17
+  }
12 18
 
13 19
   use_ok('Lystyng::Schema');
14 20
 

0 notes on commit 26f931e

Please sign in to comment.
Something went wrong with that request. Please try again.