started work to add pod tests to all submodules.
Marcus Ramberg [Thu, 7 Apr 2005 22:48:55 +0000 (22:48 +0000)]
Changes
MANIFEST
lib/Catalyst/View/TT.pm
t/01use.t [moved from test.pl with 100% similarity]
t/02pod.t [new file with mode: 0644]
t/03podcoverage.t [new file with mode: 0644]

diff --git a/Changes b/Changes
index c829bee..73d3e12 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Perl extension Catalyst::View::TT.
 
 0.10  XXX XXX XX XX:00:00 2005
+        - Added POD tests and made them pass.
         - updated for Catalyst 5
 
 0.09  Wed Mar 29 13:47:00 2005
index 642334a..8c00db0 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -5,4 +5,6 @@ Makefile.PL
 MANIFEST                       This list of files
 META.yml
 README
-test.pl
+t/01use.t
+t/02pod.t
+t/03podcoverage.t
index 1daa3ad..db1b580 100644 (file)
@@ -73,6 +73,13 @@ You can supress template profiling when debug is enabled by setting:
 
 =head2 METHODS
 
+=over 4
+
+=item new
+
+The constructor for the TT view. Sets up the template provider, 
+and reads the application config.
+
 =cut
 
 sub new {
@@ -94,12 +101,14 @@ sub new {
     return $self;
 }
 
-=head3 process
+=item process
 
-Renders the template specified in C<< $c->stash->{template} >> or C<< $c->request->match >>.
-Template variables are set up from the contents of C<< $c->stash >>, augmented with C<base>
-set to C<< $c->req->base >>, C<c> to C<$c> and C<name> to C<< $c->config->{name} >>.  Output is
-stored in C<< $c->response->output >>.
+Renders the template specified in C<< $c->stash->{template} >> or C<< 
+$c->request->match >>.
+Template variables are set up from the contents of C<< $c->stash >>, 
+Jaugmented with C<base> set to C<< $c->req->base >>, C<c> to C<$c> and 
+C<name> to C<< $c->config->{name} >>.  Output is stored in 
+C<< $c->response->output >>.
 
 =cut
 
@@ -136,16 +145,16 @@ sub process {
     return 1;
 }
 
-=head3 config
+=item config
 
 This allows your view subclass to pass additional settings to the
 TT config hash.
 
-=cut 
+=back
 
 =head1 SEE ALSO
 
-L<Catalyst>.
+L<Catalyst>. L<Template::Manual>
 
 =head1 AUTHOR
 
@@ -154,8 +163,8 @@ Marcus Ramberg, C<mramberg@cpan.org>
 
 =head1 COPYRIGHT
 
-This program is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
+This program is free software, you can redistribute it and/or modify it 
+under the same terms as Perl itself.
 
 =cut
 
similarity index 100%
rename from test.pl
rename to t/01use.t
diff --git a/t/02pod.t b/t/02pod.t
new file mode 100644 (file)
index 0000000..1647794
--- /dev/null
+++ b/t/02pod.t
@@ -0,0 +1,7 @@
+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
new file mode 100644 (file)
index 0000000..d91be5e
--- /dev/null
@@ -0,0 +1,7 @@
+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();