is($schema->resultset("Artist")->search(), 3, "Three artists returned");
} 'Custom cursor autoloaded';
+# test component_class reentrancy
+SKIP: {
+ DBIx::Class::Optional::Dependencies->skip_without( 'Class::Unload>=0.07' );
+
+ Class::Unload->unload('DBICTest::Cursor');
+
+ lives_ok {
+ is($schema->resultset("Artist")->search(), 3, "Three artists still returned");
+ } 'Custom cursor auto re-loaded';
+}
+
done_testing;