From: Sebastian Riedel Date: Mon, 30 Jan 2006 18:13:18 +0000 (+0000) Subject: Cleaned up generated tests X-Git-Tag: 5.7099_04~715 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=92ffbc90bb1307db69ce5b3b4f2d2c6384d520ee Cleaned up generated tests --- diff --git a/Changes b/Changes index 63c3f43..f990611 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ This file documents the revision history for Perl extension Catalyst. 5.64 + - Cleaned up generated tests - Updated YAML support to use ConfigLoader - Fixed path dispatch to canonicalise correctly (see http://dev.catalyst.perl.org/ticket/62) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index b30ecf1..25b2c7a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -47,7 +47,7 @@ our $DETACH = "catalyst_detach\n"; require Module::Pluggable::Fast; # Helper script generation -our $CATALYST_SCRIPT_GEN = 26; +our $CATALYST_SCRIPT_GEN = 27; __PACKAGE__->mk_classdata($_) for qw/components arguments dispatcher engine log dispatcher_class diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 73f130a..006cdfb 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -608,7 +608,7 @@ use inc::Module::Install; name '[% dir %]'; all_from '[% path %]'; -requires Catalyst => '5.62'; +requires Catalyst => '5.64'; catalyst; @@ -626,11 +626,16 @@ This file documents the revision history for Perl extension [% name %]. 0.01 [% time %] - initial revision, generated by Catalyst __apptest__ +use strict; +use warnings; use Test::More tests => 2; -BEGIN { use_ok( Catalyst::Test, '[% name %]' ); } -ok( request('/')->is_success ); +BEGIN { use_ok 'Catalyst::Test', '[% name %]' } + +ok( request('/')->is_success, 'Request should succeed' ); __podtest__ +use strict; +use warnings; use Test::More; eval "use Test::Pod 1.14"; @@ -639,6 +644,8 @@ plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; all_pod_files_ok(); __podcoveragetest__ +use strict; +use warnings; use Test::More; eval "use Test::Pod::Coverage 1.04"; @@ -1041,12 +1048,14 @@ it under the same terms as Perl itself. 1; __comptest__ +use strict; +use warnings; [% IF long_type == 'Controller' %] use Test::More tests => 3; -use_ok( Catalyst::Test, '[% app %]' ); +use_ok( 'Catalyst::Test', '[% app %]' ); use_ok('[% class %]'); -ok( request('[% uri %]')->is_success ); +ok( request('[% uri %]')->is_success, 'Request should succeed' ); [% ELSE %] use Test::More tests => 1; use_ok('[% class %]');