From: Peter Rabbitson Date: Tue, 9 Sep 2008 22:59:42 +0000 (+0000) Subject: Consistent skip messages throughout the test suite (consists of a simple reordering... X-Git-Tag: v0.08240~360 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95cbe02e0570b4ce61e87efeef465a4a04d00654;p=dbsrgits%2FDBIx-Class.git Consistent skip messages throughout the test suite (consists of a simple reordering of prerequisite eval checks) --- diff --git a/t/73oracle_inflate.t b/t/73oracle_inflate.t index 3d1b413..20e7089 100644 --- a/t/73oracle_inflate.t +++ b/t/73oracle_inflate.t @@ -7,16 +7,18 @@ use DBICTest; my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/}; -eval "use DateTime; use DateTime::Format::Oracle;"; -if ($@) { - plan skip_all => 'needs DateTime and DateTime::Format::Oracle for testing'; -} -elsif (not ($dsn && $user && $pass)) { +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 { - plan tests => 4; + eval "use DateTime; use DateTime::Format::Oracle;"; + if ($@) { + plan skip_all => 'needs DateTime and DateTime::Format::Oracle for testing'; + } + else { + plan tests => 4; + } } # DateTime::Format::Oracle needs this set diff --git a/t/cdbi-DeepAbstractSearch/01_search.t b/t/cdbi-DeepAbstractSearch/01_search.t index ddc953c..6826bb9 100755 --- a/t/cdbi-DeepAbstractSearch/01_search.t +++ b/t/cdbi-DeepAbstractSearch/01_search.t @@ -2,6 +2,12 @@ use strict; use Test::More; BEGIN { + eval "use DBIx::Class::CDBICompat;"; + if ($@) { + plan (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"); + next; + } + plan skip_all => 'needs DBD::SQLite for testing' unless eval { require DBD::SQLite }; diff --git a/t/cdbi-t/15-accessor.t b/t/cdbi-t/15-accessor.t index 30f61c8..99bcdbd 100644 --- a/t/cdbi-t/15-accessor.t +++ b/t/cdbi-t/15-accessor.t @@ -4,7 +4,6 @@ use Test::More; BEGIN { eval "use DBIx::Class::CDBICompat;"; if ($@) { - diag $@; plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); next; } diff --git a/t/cdbi-t/22-deflate_order.t b/t/cdbi-t/22-deflate_order.t index 965bc49..d813b19 100644 --- a/t/cdbi-t/22-deflate_order.t +++ b/t/cdbi-t/22-deflate_order.t @@ -3,6 +3,12 @@ use strict; use Test::More; +eval "use DBIx::Class::CDBICompat;"; +if ($@) { + plan (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"); + next; +} + eval { require Time::Piece::MySQL }; plan skip_all => "Need Time::Piece::MySQL for this test" if $@;