X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Finflate%2Fdatetime_oracle.t;h=84533e85c57881cb391d4a80eb2a7e508822f266;hp=40fa59ad134bff02f11f29e15045f5eea1965efe;hb=68de943862f06cabd397d2e74d12cd9cdc999779;hpb=67b79ae10d09c925c0e120e9de21758f388c8e70 diff --git a/t/inflate/datetime_oracle.t b/t/inflate/datetime_oracle.t index 40fa59a..84533e8 100644 --- a/t/inflate/datetime_oracle.t +++ b/t/inflate/datetime_oracle.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); @@ -11,15 +11,9 @@ if (not ($dsn && $user && $pass)) { plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test. ' . 'Warning: This test drops and creates a table called \'track\''; } -else { - eval "use DateTime; use DateTime::Format::Oracle;"; - if ($@) { - plan skip_all => 'needs DateTime and DateTime::Format::Oracle for testing'; - } - else { - plan tests => 10; - } -} + +plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle'); # DateTime::Format::Oracle needs this set $ENV{NLS_DATE_FORMAT} = 'DD-MON-YY'; @@ -94,6 +88,8 @@ is( $track->last_updated_at, $timestamp, 'DateTime round-trip as TIMESTAMP' ); is( int $track->last_updated_at->nanosecond, int 500_000_000, 'TIMESTAMP nanoseconds survived' ); +done_testing; + # clean up our mess END { if($schema && ($dbh = $schema->storage->dbh)) {