pod coverage test for helper generated apps
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Helper.pm
index 81258bc..d4fd807 100644 (file)
@@ -150,6 +150,17 @@ use_ok( Catalyst::Test, '$name' );
 
 ok( request('/')->is_success );
 EOF
+    my $pc = IO::File->new("> $t/02podcoverage.t")
+      or die qq/Couldn't open "$t\/02podcoverage.t", "$!"/;
+    print $pc <<"EOF";
+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();
+EOF
 }
 
 sub _mk_server {
@@ -508,6 +519,26 @@ EOF
     }
 }
 
+=head1 HELPERS
+
+Helpers are classes that provide two methods.
+
+    * mk_compclass - creates the Component class
+    * mk_comptest  - creates the Component test
+
+So when you call C<bin/create view MyView TT>, create would try to execute
+Catalyst::Helper::View::TT->mk_compclass and
+Catalyst::Helper::View::TT->mk_comptest.
+
+See L<Catalyst::Helper::View::TT> and L<Catalyst::Helper::Model::CDBI> for
+examples.
+
+All helper classes should be under one of the following namespaces.
+
+    Catalyst::Helper::Model::
+    Catalyst::Helper::View::
+    Catalyst::Helper::Controller::
+
 =head1 SEE ALSO
 
 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,