Force author tests to be run when in author mode
Tomas Doran [Sun, 30 Aug 2009 16:24:19 +0000 (17:24 +0100)]
ChangeLog
Makefile.PL
t/author/pod.t [new file with mode: 0644]
t/author/pod_coverage.t [new file with mode: 0644]
t/pod.t [deleted file]
t/pod_coverage.t [deleted file]

index 6d48eec..2817705 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ Revision history for Perl extension MooseX-Getopt
     - Split into MooseX::Getopt::Basic (without the G::L::Descriptive support)
     and MooseX::Getopt::GLD.
 
+  * Tests
+     - Ensure author tests get run when in author mode.
+
 0.21 Thu. Aug 27 2009
   * MooseX::Getopt
     - Enable and document the argv parameter to the constructor.
index d9d0041..af72d8c 100644 (file)
@@ -1,5 +1,12 @@
+use strict;
+use warnings;
 use inc::Module::Install 0.75;
 
+if ($Module::Install::AUTHOR) {
+    require Module::Install::AuthorRequires;
+    require Module::Install::AuthorTests;
+}
+
 name 'MooseX-Getopt';
 license 'perl';
 
@@ -15,6 +22,10 @@ build_requires 'Test::Moose';
 build_requires 'Test::More'       => '0.62';
 build_requires 'Test::Exception'  => '0.21';
 
+author_requires 'Test::Pod' => 1.14;
+author_requires 'Test::Pod::Coverage' => '1.04';
+author_tests('t/author');
+
 resources repository => 'git://git.moose.perl.org/MooseX-Getopt.git';
 
 auto_manifest();
diff --git a/t/author/pod.t b/t/author/pod.t
new file mode 100644 (file)
index 0000000..be6ebf5
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Pod 1.14;
+
+all_pod_files_ok();
diff --git a/t/author/pod_coverage.t b/t/author/pod_coverage.t
new file mode 100644 (file)
index 0000000..d3225ba
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Pod::Coverage 1.04;
+
+all_pod_coverage_ok();
diff --git a/t/pod.t b/t/pod.t
deleted file mode 100644 (file)
index 18ba128..0000000
--- a/t/pod.t
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More;
-plan skip_all => 'set RELEASE_TESTING to run these tests'
-  unless $ENV{RELEASE_TESTING};
-
-eval "use Test::Pod 1.14";
-plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
-
-all_pod_files_ok();
diff --git a/t/pod_coverage.t b/t/pod_coverage.t
deleted file mode 100644 (file)
index dbc1603..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More;
-plan skip_all => 'set RELEASE_TESTING to run these tests'
-  unless $ENV{RELEASE_TESTING};
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
-
-all_pod_coverage_ok();