Several 5.8.old fixes
[dbsrgits/DBIx-Class.git] / t / storage / cursor.t
CommitLineData
db29433c 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Exception;
6
7use lib qw(t/lib);
8use DBICTest;
9
10my $schema = DBICTest->init_schema(cursor_class => 'DBICTest::Cursor');
11
12lives_ok {
13 is($schema->resultset("Artist")->search(), 3, "Three artists returned");
14} 'Custom cursor autoloaded';
15
0d374214 16SKIP: {
17 eval { require Class::Unload }
18 or skip 'component_class reentrancy test requires Class::Unload', 1;
19
20 Class::Unload->unload('DBICTest::Cursor');
21
22 lives_ok {
23 is($schema->resultset("Artist")->search(), 3, "Three artists still returned");
24 } 'Custom cursor auto re-loaded';
25}
26
db29433c 27done_testing;