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

Sebastian Riedel sri at oook.de
Fri Mar 3 13:25:25 CET 2006


03.03.2006 11:51 Carl Franks:

> 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

We can't do that, as much as i like Test::WWW::Mechanize, it's not a  
core prereq, so we can't use it in generated code.

--
sebastian




More information about the Catalyst mailing list