Cleanup author tests
Tomas Doran [Sun, 3 Jan 2010 14:48:49 +0000 (14:48 +0000)]
Changes
Makefile.PL
t/02pod.t [deleted file]
t/03podcoverage.t [deleted file]
t/04critic.rc [deleted file]
t/04critic.t [deleted file]
t/author/02pod.t [new file with mode: 0644]
t/author/03podcoverage.t [new file with mode: 0644]
t/author/notabs.t [new file with mode: 0644]

diff --git a/Changes b/Changes
index 644b299..b20d0d9 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,9 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple
         - Switch to being a Moose role, removing dependencies on
           Class::Data::Inheritable and Class::Accessor (Andrey Kostenko in
           RT#51089)
+        - Make Pod tests mandatory for authors but never run otherwise
+        - Switch to Test::NoTabs to ensure no tabs, rather than
+          Test::Perl::Critic
 
 0.26   2009-12-06 12:30:00
         - Fix Pod to show less nasty method of assigning config by calling
index 2966418..5472fbb 100644 (file)
@@ -1,6 +1,8 @@
 use strict;
 use warnings;
 use inc::Module::Install 0.91;
+use Module::Install::AuthorRequires;
+use Module::Install::AuthorTests;
 
 name 'Catalyst-Plugin-Static-Simple';
 all_from 'lib/Catalyst/Plugin/Static/Simple.pm';
@@ -11,6 +13,14 @@ requires 'Test::More';
 requires 'Moose';
 requires 'namespace::autoclean';
 
+test_requires 'Test::More';
+
+author_requires 'Test::NoTabs';
+author_requires 'Test::Pod' => '1.14';
+author_requires 'Test::Pod::Coverage' => '1.04';
+
+author_tests 't/author';
+
 if( can_use 'Catalyst::Plugin::SubRequest' ) {
     unless( can_use 'Catalyst::Plugin::SubRequest' => '0.08' ) {
         print "** WARNING **\n"
diff --git a/t/02pod.t b/t/02pod.t
deleted file mode 100644 (file)
index 1647794..0000000
--- a/t/02pod.t
+++ /dev/null
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_files_ok();
diff --git a/t/03podcoverage.t b/t/03podcoverage.t
deleted file mode 100644 (file)
index d91be5e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_coverage_ok();
diff --git a/t/04critic.rc b/t/04critic.rc
deleted file mode 100644 (file)
index 412f770..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include  = CodeLayout::ProhibitHardTabs
-only     = 1
-
-[CodeLayout::ProhibitHardTabs]
-allow_leading_tabs = 0
\ No newline at end of file
diff --git a/t/04critic.t b/t/04critic.t
deleted file mode 100644 (file)
index d94c165..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-use strict;
-use warnings;
-
-use File::Spec;
-use FindBin ();
-use Test::More;
-
-if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) {
-    plan skip_all => 'Critic test only for developers.';
-}
-else {
-    eval { require Test::Perl::Critic };
-    if ( $@ ) {
-        plan tests => 1;
-        fail( 'You must install Test::Perl::Critic to run 04critic.t' );
-        exit;
-    }
-}
-
-my $rcfile = File::Spec->catfile( 't', '04critic.rc' );
-Test::Perl::Critic->import( -profile => $rcfile );
-all_critic_ok();
\ No newline at end of file
diff --git a/t/author/02pod.t b/t/author/02pod.t
new file mode 100644 (file)
index 0000000..6a644e9
--- /dev/null
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Test::Pod 1.14;
+
+all_pod_files_ok();
diff --git a/t/author/03podcoverage.t b/t/author/03podcoverage.t
new file mode 100644 (file)
index 0000000..66338a3
--- /dev/null
@@ -0,0 +1,5 @@
+use Test::More;
+
+use Test::Pod::Coverage 1.04;
+
+all_pod_coverage_ok();
diff --git a/t/author/notabs.t b/t/author/notabs.t
new file mode 100644 (file)
index 0000000..902bbc4
--- /dev/null
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::NoTabs;
+
+all_perl_files_ok(qw/lib/);
+