68inflate_has_a.t tests the cdbi-compat shim and thus belongs in t/cdbi-t
[dbsrgits/DBIx-Class.git] / t / cdbi-t / 68-inflate_has_a.t
similarity index 78%
rename from t/68inflate_has_a.t
rename to t/cdbi-t/68-inflate_has_a.t
index 9dc1661..0019e29 100644 (file)
@@ -1,20 +1,26 @@
 use strict;
-use warnings;  
-
+use warnings;
 use Test::More;
-use lib qw(t/lib);
-use DBICTest;
 
-my $schema = DBICTest->init_schema();
+BEGIN {
+  eval "use DBIx::Class::CDBICompat;";
+  plan skip_all => "Class::Trigger and DBIx::ContextualFetch required"
+    if $@;
 
-eval { require DateTime };
-plan skip_all => "Need DateTime for inflation tests" if $@;
+  eval { require DateTime };
+  plan skip_all => "Need DateTime for inflation tests" if $@;
 
-eval { require Clone };
-plan skip_all => "Need Clone for CDBICompat inflation tests" if $@;
+  eval { require Clone };
+  plan skip_all => "Need Clone for CDBICompat inflation tests" if $@;
+}
 
 plan tests => 6;
 
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest->init_schema();
+
 DBICTest::Schema::CD->load_components(qw/CDBICompat::Relationships/);
 
 DBICTest::Schema::CD->has_a( 'year', 'DateTime',