Centralize remaining uses of Sub::Name within _Util
[dbsrgits/DBIx-Class.git] / t / icdt / engine_specific / firebird.t
index 05ef381..5ce1d8f 100644 (file)
@@ -1,3 +1,4 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
 use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt _rdbms_firebird_common );
 
 use strict;
@@ -5,7 +6,7 @@ use warnings;
 
 use Test::More;
 use DBIx::Class::_Util 'scope_guard';
-use lib qw(t/lib);
+
 use DBICTest;
 
 my $env2optdep = {
@@ -27,14 +28,11 @@ my $schema;
 
 for my $prefix (keys %$env2optdep) { SKIP: {
 
-  my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
-
-  next unless $dsn;
+  DBIx::Class::Optional::Dependencies->skip_without( $env2optdep->{$prefix} );
 
   note "Testing with ${prefix}_DSN";
 
-  skip ("Testing with ${prefix}_DSN needs " . DBIx::Class::Optional::Dependencies->req_missing_for( $env2optdep->{$prefix} ), 1)
-    unless  DBIx::Class::Optional::Dependencies->req_ok_for($env2optdep->{$prefix});
+  my ($dsn, $user, $pass) = map { $ENV{"${prefix}_$_"} } qw/DSN USER PASS/;
 
   $schema = DBICTest::Schema->connect($dsn, $user, $pass, {
     quote_char => '"',