From: Peter Rabbitson Date: Sun, 15 Nov 2009 11:20:25 +0000 (+0000) Subject: Fix plan X-Git-Tag: v0.08116~142 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a789a7270a3d1e0fe3129960aafe8ba389d035e;p=dbsrgits%2FDBIx-Class.git Fix plan --- diff --git a/t/74mssql.t b/t/74mssql.t index f2059be..02e1950 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -18,10 +18,6 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); -my $TESTS = 18; - -plan tests => $TESTS * 2; - my @storage_types = ( 'DBI::Sybase::Microsoft_SQL_Server', 'DBI::Sybase::Microsoft_SQL_Server::NoBindVars', @@ -29,6 +25,7 @@ my @storage_types = ( my $storage_idx = -1; my $schema; +my $NUMBER_OF_TESTS_IN_BLOCK = 18; for my $storage_type (@storage_types) { $storage_idx++; @@ -44,7 +41,7 @@ for my $storage_type (@storage_types) { if ($storage_idx == 0 && ref($schema->storage) =~ /NoBindVars\z/) { my $tb = Test::More->builder; - $tb->skip('no placeholders') for 1..$TESTS; + $tb->skip('no placeholders') for 1..$NUMBER_OF_TESTS_IN_BLOCK; next; } @@ -181,6 +178,8 @@ lives_ok (sub { is ($artist->id, 1, 'Artist retrieved successfully'); }, 'Query-induced autoconnect works'); +done_testing; + # clean up our mess END { if (my $dbh = eval { $schema->storage->dbh }) {