X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-sweet-t%2F08pager.t;h=07166e63a676907f96612b78c054d40e9dc173e1;hb=f34cb1fdd136d65352df8757b6de7686ad3b84e5;hp=ea77d81bbef6138fd343ab8975fde6907c3b0d93;hpb=8452e496adea0c57b81f413e11b2f5b5b6e62c5c;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/cdbi-sweet-t/08pager.t b/t/cdbi-sweet-t/08pager.t index ea77d81..07166e6 100644 --- a/t/cdbi-sweet-t/08pager.t +++ b/t/cdbi-sweet-t/08pager.t @@ -3,16 +3,25 @@ use warnings; use Test::More; -eval "use DBD::SQLite"; -plan skip_all => 'needs DBD::SQLite for testing' if $@; - -plan tests => 10; +BEGIN { + eval "use DBIx::Class::CDBICompat;"; + if ($@) { + plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); + next; + } + eval "use DBD::SQLite"; + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 10); +} use lib 't/lib'; -use_ok('DBICTest::HelperRels'); +use_ok('DBICTest'); + +DBICTest::Schema::CD->load_components(qw/CDBICompat CDBICompat::Pager/); + +my $schema = DBICTest->init_schema(compose_connection => 1); -DBICTest::CD->load_components(qw/CDBICompat::Pager/); +DBICTest::CD->result_source_instance->schema->storage($schema->storage); my ( $pager, $it ) = DBICTest::CD->page( {},