[Catalyst] script/create.pl -mech controller (patch)

Carl Franks fireartist at gmail.com
Fri Mar 3 11:51:39 CET 2006


Attached is a patch which adds a new '-mech' flag to the
script/create.pl program

It changes the generated test-file, so that instead of testing this...
***
BEGIN { use_ok 'Catalyst::Test', 'myapp' }
BEGIN { use_ok 'testfoo::Controller::Login' }

ok( request('login')->is_success, 'Request should succeed' );
***

It instead tests...
***
BEGIN { use_ok 'Test::WWW::Mechanize::Catalyst', 'myapp' }

ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'created mech object' );
$mech->get_ok( 'http://localhost/login' );
***

The flag does nothing when creating something other than a controller.

The patch is for file "trunk/Catalyst/lib/Catalyst/Helper.pm"
against svn revision 3535

Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Helper.pm.patch
Type: application/octet-stream
Size: 1347 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060303/be43c611/attachment.obj 


More information about the Catalyst mailing list