X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fdatetime_informix.t;h=5746f250e0f15ceaccdf79e97078a41dd352c833;hb=199fbc453ec03891d0e156d7353c5e992ba4de47;hp=af23410fecf22889c9eb6f79a91db0db212f599f;hpb=b0a4cf8eb18957ad8076d2b3d68bcdd787aedd18;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/datetime_informix.t b/t/inflate/datetime_informix.t index af23410..5746f25 100644 --- a/t/inflate/datetime_informix.t +++ b/t/inflate/datetime_informix.t @@ -1,12 +1,19 @@ use strict; -use warnings; +use warnings; use Test::More; use Test::Exception; +use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; use Scope::Guard (); +plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt') +. ' and ' . +DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_informix') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') + && DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_informix'); + my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_INFORMIX_${_}" } qw/DSN USER PASS/}; if (not $dsn) { @@ -14,11 +21,6 @@ if (not $dsn) { Set $ENV{DBICTEST_INFORMIX_DSN} _USER and _PASS to run this test'. Warning: This test drops and creates a table called 'event'"; EOF -} else { - eval "use DateTime; use DateTime::Format::Strptime;"; - if ($@) { - plan skip_all => 'needs DateTime and DateTime::Format::Strptime for testing'; - } } my $schema;