Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / sweet / 08pager.t
index e14c4fa..b91f897 100644 (file)
@@ -1,3 +1,4 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
 
 use strict;
@@ -5,7 +6,7 @@ use warnings;
 
 use Test::More;
 
-use lib 't/lib';
+
 use DBICTest;
 
 DBICTest::Schema::CD->load_components(qw/CDBICompat CDBICompat::Pager/);
@@ -63,15 +64,4 @@ is( $it->next, undef, "disable_sql_paging next past end of page ok" );
 );
 is( $it->count, 1, "complex abstract count ok" );
 
-# cleanup globals so we do not trigger the leaktest
-for ( map { DBICTest->schema->class($_) } DBICTest->schema->sources ) {
-  $_->class_resolver(undef);
-  $_->resultset_instance(undef);
-  $_->result_source_instance(undef);
-}
-{
-  no warnings qw/redefine once/;
-  *DBICTest::schema = sub {};
-}
-
 done_testing;