From: Dagfinn Ilmari Mannsåker Date: Sat, 18 Apr 2009 11:06:20 +0000 (+0000) Subject: Now that we always dump to disk, don't bother testing twice. X-Git-Tag: 0.04999_07~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc97d5bea071bf3893f008435e4724a9370fdf0f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Now that we always dump to disk, don't bother testing twice. --- diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index c749b8e..a8ab6b7 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -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};