From: Marcus Ramberg Date: Thu, 7 Apr 2005 22:48:55 +0000 (+0000) Subject: started work to add pod tests to all submodules. X-Git-Tag: v0.13~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2774dc77bd7a72a60d51d5c85802ddcaa724a012;hp=becb7ac29cc66744275c5322f93b5e3cb5ec599f;p=catagits%2FCatalyst-View-TT.git started work to add pod tests to all submodules. --- diff --git a/Changes b/Changes index c829bee..73d3e12 100644 --- 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 diff --git a/MANIFEST b/MANIFEST index 642334a..8c00db0 100644 --- 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 diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index 1daa3ad..db1b580 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -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 -set to C<< $c->req->base >>, C to C<$c> and C 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 set to C<< $c->req->base >>, C to C<$c> and +C 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. +L. L =head1 AUTHOR @@ -154,8 +163,8 @@ Marcus Ramberg, C =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 diff --git a/test.pl b/t/01use.t 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 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 index 0000000..d91be5e --- /dev/null +++ b/t/03podcoverage.t @@ -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();