Remove empty sections
[dbsrgits/SQL-Translator.git] / lib / Test / SQL / Translator.pm
index 63a8954..5e19082 100644 (file)
@@ -14,9 +14,9 @@ use Test::More;
 use SQL::Translator::Schema::Constants;
 
 use base qw(Exporter);
-use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = '1.59';
-@EXPORT = qw(
+our @EXPORT_OK;
+our $VERSION = '1.59';
+our @EXPORT = qw(
     schema_ok
     table_ok
     field_ok
@@ -467,7 +467,9 @@ sub maybe_plan {
             join ", ", @errors;
         plan skip_all => $msg;
     }
-    elsif ($ntests and $ntests ne 'no_plan') {
+    return unless defined $ntests;
+
+    if ($ntests ne 'no_plan') {
         plan tests => $ntests;
     }
     else {
@@ -582,6 +584,9 @@ modules on which test execution depends:
 If one of C<SQL::Translator::Parser::MySQL>'s dependencies does not exist,
 then the test will be skipped.
 
+Instead of a number of tests, you can pass C<undef> if you're using
+C<done_testing()>, or C<'no_plan'> if you don't want a plan at all.
+
 =head1 EXPORTS
 
 table_ok, field_ok, constraint_ok, index_ok, view_ok, trigger_ok, procedure_ok,
@@ -600,7 +605,7 @@ does field_ok run? Can then use these to set up the test plan easily.
 
 =item Test skipping
 
-As the test subs wrap up lots of tests in one call you can't skip idividual
+As the test subs wrap up lots of tests in one call you can't skip individual
 tests only whole sets e.g. a whole table or field.
 We could add skip_* items to the test hashes to allow per test skips. e.g.
 
@@ -614,8 +619,6 @@ schema file and test yaml file to compare it against.
 
 =back
 
-=head1 BUGS
-
 =head1 AUTHOR
 
 Mark D. Addison E<lt>mark.addison@itn.co.ukE<gt>,