Commit | Line | Data |
db29433c |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use Test::Exception; |
6 | |
7 | use lib qw(t/lib); |
8 | use DBICTest; |
9 | |
10 | my $schema = DBICTest->init_schema(cursor_class => 'DBICTest::Cursor'); |
11 | |
12 | lives_ok { |
13 | is($schema->resultset("Artist")->search(), 3, "Three artists returned"); |
14 | } 'Custom cursor autoloaded'; |
15 | |
461e818a |
16 | # test component_class reentrancy |
0d374214 |
17 | SKIP: { |
461e818a |
18 | DBIx::Class::Optional::Dependencies->skip_without( 'Class::Unload>=0.07' ); |
0d374214 |
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 |
27 | done_testing; |