X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2Fsweet%2F08pager.t;h=d745883c37845b80c87e29f5760347630b498666;hb=2c2bc4e58c2146670960fc1a0a2ae802cb650506;hp=9bf7d9b35c5a686dd45f6c72c949988d6596eded;hpb=8273e845426f0187b4ad6c4a1b42286fa09a648f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/sweet/08pager.t b/t/cdbi/sweet/08pager.t index 9bf7d9b..d745883 100644 --- a/t/cdbi/sweet/08pager.t +++ b/t/cdbi/sweet/08pager.t @@ -3,17 +3,9 @@ use warnings; use Test::More; -use lib 't/lib'; -use DBICTest; - -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - if ($@) { - plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); - next; - } - plan tests => 9; -} +use lib 't/cdbi/testlib'; +use DBIC::Test::SQLite; +use DBICTest::Schema; DBICTest::Schema::CD->load_components(qw/CDBICompat CDBICompat::Pager/); @@ -69,3 +61,16 @@ is( $it->next, undef, "disable_sql_paging next past end of page ok" ); { rows => 5 } ); 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;