Merge the relationship resolution rework
[dbsrgits/DBIx-Class.git] / t / cdbi / retrieve_from_sql_with_limit.t
index 70a6128..b209ba0 100644 (file)
@@ -1,16 +1,13 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
-use Test::More;
+use warnings;
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
-          : (tests=> 3);
-}
+use Test::More;
 
-INIT {
-    use lib 't/cdbi/testlib';
-    use Film;
-}
+use lib 't/cdbi/testlib';
+use Film;
 
 for my $title ("Bad Taste", "Braindead", "Forgotten Silver") {
     Film->insert({ Title => $title, Director => 'Peter Jackson' });
@@ -23,3 +20,5 @@ Film->insert({ Title => "Transformers", Director => "Michael Bay"});
     is @films, 2, "retrieve_from_sql with LIMIT";
     is( $_->director, "Peter Jackson" ) for @films;
 }
+
+done_testing;