X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F74mssql.t;fp=t%2F74mssql.t;h=02e19504db8a871054cf076aa5de02b80b184e44;hb=1a789a7270a3d1e0fe3129960aafe8ba389d035e;hp=f2059bed510d10695bb24fc0b7db767c9e06a7d8;hpb=559ae74c70e1dff7929ffe80531b79a3c9f32377;p=dbsrgits%2FDBIx-Class.git 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 }) {