[Catalyst] script/create test file uri

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


03.03.2006 12:01 Carl Franks:

> I'd like to submit a patch to change the contents of generated
> test-files, such that instead of testing:
>     ok( request('action')->is_success, 'Request should succeed' );
> it tests:
>     ok( request('/action')->is_success, 'Request should succeed' );
>
> (note the leading "/" in the uri)
>
> There are 2 ways to do this, either change the __comptest__ template
> in Helper.pm from:
>     request('[% uri %]')
> to:
>     request('/[% uri %]')
>
> Or prepend the "/" to the $self->{uri} variable in the next_test()  
> method.
>
> I think the 2nd option is the 'better' fix, but I'm not sure of the
> consequences.
> Certainly, in Helper.pm, the only place the value of $self->{uri} is
> used, is in the __comptest__ template.
> However, I've no idea whether the value might be used by other helper
> packages outside the main catalyst distro.
> Depending on how other files use it, it might be a good thing that
> it's 'fixed', then again, maybe not!

Thanks, applied.


--
sebastian




More information about the Catalyst mailing list