Make sure the component_class autoloader works across module reloads
[dbsrgits/DBIx-Class.git] / t / storage / cursor.t
index fb5f0cc..e6c0ba7 100644 (file)
@@ -13,4 +13,15 @@ lives_ok {
   is($schema->resultset("Artist")->search(), 3, "Three artists returned");
 } 'Custom cursor autoloaded';
 
+SKIP: {
+  eval { require Class::Unload }
+    or skip 'component_class reentrancy test requires Class::Unload', 1;
+
+  Class::Unload->unload('DBICTest::Cursor');
+
+  lives_ok {
+    is($schema->resultset("Artist")->search(), 3, "Three artists still returned");
+  } 'Custom cursor auto re-loaded';
+}
+
 done_testing;