X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ficdt%2Fengine_specific%2Ffirebird.t;h=05ef3812df0ab68c83e621248cb6969cead4561f;hb=bbf6a9a5d39cbf1c9d22cccd298ae95ac0fef694;hp=207df9fb582cdcde9cdef8edd3971391b2bb7ed0;hpb=8548e45cbaa8d8862ca78f675c73398ec2b0dc1d;p=dbsrgits%2FDBIx-Class.git diff --git a/t/icdt/engine_specific/firebird.t b/t/icdt/engine_specific/firebird.t index 207df9f..05ef381 100644 --- a/t/icdt/engine_specific/firebird.t +++ b/t/icdt/engine_specific/firebird.t @@ -1,12 +1,12 @@ -use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_dt'; +use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt _rdbms_firebird_common ); use strict; use warnings; use Test::More; +use DBIx::Class::_Util 'scope_guard'; use lib qw(t/lib); use DBICTest; -use Scope::Guard (); my $env2optdep = { DBICTEST_FIREBIRD => 'test_rdbms_firebird', @@ -14,13 +14,14 @@ my $env2optdep = { DBICTEST_FIREBIRD_ODBC => 'test_rdbms_firebird_odbc', }; -plan skip_all => join (' ', - 'Set $ENV{DBICTEST_FIREBIRD_DSN} and/or $ENV{DBICTEST_FIREBIRD_INTERBASE_DSN}', - 'and/or $ENV{DBICTEST_FIREBIRD_ODBC_DSN},', - '_USER and _PASS to run these tests.', - - "WARNING: This test drops and creates a table called 'event'", -) unless grep { $ENV{"${_}_DSN"} } keys %$env2optdep; +my @tdeps = values %$env2optdep; +plan skip_all => 'Test needs ' . (join ' OR ', map + { "[ @{[ DBIx::Class::Optional::Dependencies->req_missing_for( $_ ) ]} ]" } + @tdeps +) unless scalar grep + { DBIx::Class::Optional::Dependencies->req_ok_for( $_ ) } + @tdeps +; my $schema; @@ -41,7 +42,7 @@ for my $prefix (keys %$env2optdep) { SKIP: { on_connect_call => [ 'datetime_setup' ], }); - my $sg = Scope::Guard->new(sub { cleanup($schema) } ); + my $sg = scope_guard { cleanup($schema) }; eval { $schema->storage->dbh->do('DROP TABLE "event"') }; $schema->storage->dbh->do(<<'SQL');