Now that we always dump to disk, don't bother testing twice.
Dagfinn Ilmari Mannsåker [Sat, 18 Apr 2009 11:06:20 +0000 (11:06 +0000)]
t/lib/dbixcsl_common_tests.pm

index c749b8e..a8ab6b7 100644 (file)
@@ -51,7 +51,7 @@ sub _monikerize {
 sub run_tests {
     my $self = shift;
 
-    plan tests => 3 + 2 * (134 + ($self->{extra}->{count} || 0));
+    plan tests => 3 + 134 + ($self->{extra}->{count} || 0);
 
     $self->create();
 
@@ -60,16 +60,7 @@ sub run_tests {
     # First, with in-memory classes
     my $schema_class = $self->setup_schema(@connect_info);
     $self->test_schema($schema_class);
-
-    # Then, with dumped classes
     $self->drop_tables;
-    $self->create;
-    $self->{dump} = 1;
-
-    unshift @INC, $DUMP_DIR;
-    $self->reload_schema($schema_class);
-    $schema_class->connection(@connect_info);
-    $self->test_schema($schema_class);
 }
 
 sub setup_schema {
@@ -1191,18 +1182,6 @@ sub drop_tables {
     $dbh->disconnect;
 }
 
-sub reload_schema {
-    my ($self, $schema) = @_;
-    
-    for my $source ($schema->sources) {
-        Class::Unload->unload( $schema->class( $source ) );
-        Class::Unload->unload( ref $schema->resultset( $source ) );
-    }
-
-    Class::Unload->unload( $schema );
-    eval "require $schema" or die $@;
-}
-
 sub DESTROY {
     my $self = shift;
     $self->drop_tables if $self->{_created};