[Bast-commits] r8713 - DBIx-Class/0.08/trunk/t
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Mon Feb 15 14:49:55 GMT 2010
Author: rafl
Date: 2010-02-15 14:49:55 +0000 (Mon, 15 Feb 2010)
New Revision: 8713
Modified:
DBIx-Class/0.08/trunk/t/86sqlt.t
Log:
Make sure we actually run all tests, given we're using done_testing.
Modified: DBIx-Class/0.08/trunk/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/trunk/t/86sqlt.t 2010-02-15 13:50:56 UTC (rev 8712)
+++ DBIx-Class/0.08/trunk/t/86sqlt.t 2010-02-15 14:49:55 UTC (rev 8713)
@@ -44,28 +44,34 @@
-# replace the sqlt calback with a custom version ading an index
-$schema->source('Track')->sqlt_deploy_callback(sub {
- my ($self, $sqlt_table) = @_;
+{
+ my $deploy_hook_called = 0;
- is (
- $sqlt_table->schema->translator->producer_type,
- join ('::', 'SQL::Translator::Producer', $schema->storage->sqlt_type),
- 'Production type passed to translator object',
- );
+ # replace the sqlt calback with a custom version ading an index
+ $schema->source('Track')->sqlt_deploy_callback(sub {
+ my ($self, $sqlt_table) = @_;
- if ($schema->storage->sqlt_type eq 'SQLite' ) {
- $sqlt_table->add_index( name => 'track_title', fields => ['title'] )
- or die $sqlt_table->error;
- }
+ $deploy_hook_called = 1;
- $self->default_sqlt_deploy_hook($sqlt_table);
-});
+ is (
+ $sqlt_table->schema->translator->producer_type,
+ join ('::', 'SQL::Translator::Producer', $schema->storage->sqlt_type),
+ 'Production type passed to translator object',
+ );
-$schema->deploy; # do not remove, this fires the is() test in the callback above
+ if ($schema->storage->sqlt_type eq 'SQLite' ) {
+ $sqlt_table->add_index( name => 'track_title', fields => ['title'] )
+ or die $sqlt_table->error;
+ }
+ $self->default_sqlt_deploy_hook($sqlt_table);
+ });
+ $schema->deploy; # do not remove, this fires the is() test in the callback above
+ ok($deploy_hook_called, 'deploy hook got called');
+}
+
my $translator = SQL::Translator->new(
parser_args => {
'DBIx::Schema' => $schema,
More information about the Bast-commits
mailing list