Some cosmetic fixes in ANFANG
[dbsrgits/DBIx-Class.git] / t / storage / cursor.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
db29433c 3use strict;
4use warnings;
5
6use Test::More;
7use Test::Exception;
8
18a2903b 9use DBIx::Class::Optional::Dependencies;
db29433c 10use DBICTest;
11
12my $schema = DBICTest->init_schema(cursor_class => 'DBICTest::Cursor');
13
14lives_ok {
15 is($schema->resultset("Artist")->search(), 3, "Three artists returned");
16} 'Custom cursor autoloaded';
17
461e818a 18# test component_class reentrancy
0d374214 19SKIP: {
461e818a 20 DBIx::Class::Optional::Dependencies->skip_without( 'Class::Unload>=0.07' );
0d374214 21
22 Class::Unload->unload('DBICTest::Cursor');
23
24 lives_ok {
25 is($schema->resultset("Artist")->search(), 3, "Three artists still returned");
26 } 'Custom cursor auto re-loaded';
27}
28
db29433c 29done_testing;