move schema proxying into a trait
[catagits/Catalyst-Model-DBIC-Schema.git] / t / 09schema_options.t
index b38f0e3..2f95fc7 100644 (file)
@@ -20,9 +20,11 @@ lives_ok { $m->a_schema_option('pass the crack pipe') } 'delegate called';
 is $m->schema->a_schema_option, 'pass the crack pipe', 'delegation works';
 
 sub instance {
-    Catalyst::Model::DBIC::Schema->new({
+    Catalyst::Model::DBIC::Schema->COMPONENT('MyApp', {
         schema_class => 'ASchemaClass',
         connect_info => ['dbi:SQLite:foo.db', '', ''],
         @_,
     })
 }
+
+{ package MyApp; use Catalyst; }