Bring out the big-paranoia-harness - make describe_env infallible
[dbsrgits/DBIx-Class.git] / t / 67pager.t
index 2463369..994cf40 100644 (file)
@@ -1,8 +1,10 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
 use Test::More;
-use lib qw(t/lib);
+
 use DBICTest;
 
 my $schema = DBICTest->init_schema();
@@ -69,12 +71,14 @@ $it = $rs->search(
   { order_by => 'title',
     rows => 3 }
 );
-my $page = $it->page(2);
 
-is( $page->count, 2, "standard resultset paged rs count ok" );
+{
+  my $page = $it->page(2);
 
-is( $page->next->title, "Generic Manufactured Singles", "second page of standard resultset ok" );
+  is( $page->count, 2, "standard resultset paged rs count ok" );
 
+  is( $page->next->title, "Generic Manufactured Singles", "second page of standard resultset ok" );
+}
 
 # test software-based limit paging
 $it = $rs->search(