Import the latest ::Optional::Dependencies from DBIC
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 10_10informix_common.t
index e8b6b58..3217ef5 100644 (file)
@@ -1,10 +1,12 @@
+use DBIx::Class::Schema::Loader::Optional::Dependencies
+    -skip_all_without => 'test_rdbms_informix';
+
 use strict;
 use warnings;
 use Test::More;
 use Test::Exception;
 use Try::Tiny;
 use File::Path 'rmtree';
-use DBIx::Class::Optional::Dependencies;
 use DBIx::Class::Schema::Loader 'make_schema_at';
 use DBIx::Class::Schema::Loader::Utils 'split_name';
 use String::ToIdentifier::EN::Unicode 'to_identifier';
@@ -28,7 +30,7 @@ my $password = $ENV{DBICTEST_INFORMIX_PASS} || '';
 
 my ($schema, $extra_schema); # for cleanup in END for extra tests
 
-my $tester = dbixcsl_common_tests->new(
+dbixcsl_common_tests->new(
     vendor         => 'Informix',
     auto_inc_pk    => 'serial primary key',
     null           => '',
@@ -331,17 +333,7 @@ EOF
             }
         },
     },
-);
-
-if( !$dsn ) {
-    $tester->skip_tests('You need to set the DBICTEST_INFORMIX_DSN, _USER, and _PASS environment variables');
-}
-elsif (!DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_informix')) {
-    $tester->skip_tests('You need to install ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_informix'));
-}
-else {
-    $tester->run_tests();
-}
+)->run_tests();
 
 sub db_name {
     my $schema = shift;