[Bast-commits] r4834 - DBIx-Class/0.08/branches/warnfree/t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun Sep 21 23:31:38 BST 2008


Author: ribasushi
Date: 2008-09-21 23:31:38 +0100 (Sun, 21 Sep 2008)
New Revision: 4834

Modified:
   DBIx-Class/0.08/branches/warnfree/t/94versioning.t
Log:
Unregister a source before registering it again

Modified: DBIx-Class/0.08/branches/warnfree/t/94versioning.t
===================================================================
--- DBIx-Class/0.08/branches/warnfree/t/94versioning.t	2008-09-21 22:16:34 UTC (rev 4833)
+++ DBIx-Class/0.08/branches/warnfree/t/94versioning.t	2008-09-21 22:31:38 UTC (rev 4834)
@@ -41,7 +41,10 @@
 my $tvrs = $schema_orig->{vschema}->resultset('Table');
 is($schema_orig->_source_exists($tvrs), 1, 'Created schema from DDL file');
 
+# loading a new module defining a new version of the same table
+DBICVersion::Schema->_unregister_source ('Table');
 eval "use DBICVersionNew";
+
 {
   unlink('t/var/DBICVersion-Schema-2.0-MySQL.sql');
   unlink('t/var/DBICVersion-Schema-1.0-2.0-MySQL.sql');
@@ -51,6 +54,7 @@
   is($schema_upgrade->schema_version, '2.0', 'schema version ok');
   $schema_upgrade->create_ddl_dir('MySQL', '2.0', 't/var', '1.0');
   ok(-f 't/var/DBICVersion-Schema-1.0-2.0-MySQL.sql', 'Created DDL file');
+
   $schema_upgrade->upgrade();
   is($schema_upgrade->get_db_version(), '2.0', 'db version number upgraded');
 




More information about the Bast-commits mailing list