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();
# 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 {
$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};