Improve POD test and make it author-only
Dagfinn Ilmari Mannsåker [Sat, 13 Jun 2015 17:19:04 +0000 (18:19 +0100)]
Makefile.PL
t/02pod.t [deleted file]
xt/pod_validity.t [new file with mode: 0644]

index 4463582..baa44d1 100644 (file)
@@ -101,6 +101,7 @@ if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) {
 
     DBIx::Class::Schema::Loader::Optional::Dependencies->_gen_pod(undef, 'lib');
 
+    author_tests( 'xt' );
     readme_from( 'lib/DBIx/Class/Schema/Loader.pm' );
     realclean_files( qw[README MANIFEST lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod] );
 }
diff --git a/t/02pod.t b/t/02pod.t
deleted file mode 100644 (file)
index 8d99a66..0000000
--- a/t/02pod.t
+++ /dev/null
@@ -1,20 +0,0 @@
-#!perl
-
-use strict;
-use warnings;
-
-use Test::More;
-
-BEGIN {
-    use DBIx::Class::Schema::Loader::Optional::Dependencies ();
-    if (DBIx::Class::Schema::Loader::Optional::Dependencies->req_ok_for('test_pod')) {
-        Test::Pod->import;
-    }
-    else {
-        plan skip_all => 'Tests needs ' . DBIx::Class::Schema::Loader::Optional::Dependencies->req_missing_for('test_pod')
-    }
-}
-
-all_pod_files_ok();
-
-# vim:tw=0 sw=4 et sts=4:
diff --git a/xt/pod_validity.t b/xt/pod_validity.t
new file mode 100644 (file)
index 0000000..225fd7c
--- /dev/null
@@ -0,0 +1,13 @@
+use DBIx::Class::Schema::Loader::Optional::Dependencies
+    -skip_all_without => 'test_pod';
+
+use warnings;
+use strict;
+
+use Test::More;
+use lib qw(t/lib);
+
+# this has already been required but leave it here for CPANTS static analysis
+require Test::Pod;
+
+Test::Pod::all_pod_files_ok( 'lib', 'script' );