Fix tests generated for controllers generated with --mechanize
Tomas Doran [Thu, 13 Oct 2011 14:54:44 +0000 (15:54 +0100)]
Changes
share/t/comptest.tt

diff --git a/Changes b/Changes
index 2657654..cb1d690 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 This file documents the revision history for Perl extension Catalyst-Devel.
 
+        - Fix tests generated for controllers generated with --mechanize
+          to work with newer versions of Test::WWW::Mechanize::Catalyst
         - bump Module::Install dep to 1.02
         - Removed stderr hiding from 'make catalyst_par' to display errors 
           from PAR::Packer
index 9ac67d6..2c2c087 100644 (file)
@@ -3,12 +3,12 @@ use warnings;
 use Test::More;
 [% IF long_type == 'Controller' %][% IF mech %]
 
-unless (eval q{use Test::WWW::Mechanize::Catalyst '[% name %]'; 1}) {
-    plan skip_all => 'Test::WWW::Mechanize::Catalyst required';
+unless (eval q{use Test::WWW::Mechanize::Catalyst 0.55; 1}) {
+    plan skip_all => 'Test::WWW::Mechanize::Catalyst >= 0.55 required';
     exit 0;
 }
 
-ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
+ok( my $mech = Test::WWW::Mechanize::Catalyst->new(catalyst_app => '[% name %]', 'Created mech object' );
 
 $mech->get_ok( 'http://localhost[% uri %]' );
 [%- ELSE %]