And while we are on the subject of minimizing tedium...
Is there any way to set the URL base for Mech, so that I don't have
to keep typing a scheme and hostname? e.g.
$mech->set_url_base('
http://www.foo.org')
$mech->get_ok('/bar');
$mech->get_ok('/baz');
being equivalent to
$mech->get_ok('
http://www.foo.org/bar');
$mech->get_ok('
http://www.foo.org/baz');
This would be useful when running a large suite of tests against a
single site.
I looked in WWW::Mechanize and LWP::UserAgent and the various LWP and
HTTP modules, but couldn't find a way to do this.
Again, happy to do it if you are in agreement.
Thanks
Jon
On Aug 9, 2007, at 11:27 AM, Jonathan Swartz via RT wrote:
Show quoted text>
> <URL:
http://rt.cpan.org/Ticket/Display.html?id=28767 >
>
>
> On Aug 9, 2007, at 11:03 AM, andy@petdance.com via RT wrote:
>
>>
>> <URL:
http://rt.cpan.org/Ticket/Display.html?id=28767 >
>>
>> So you're saying that these would be identical:
>>
>> $mech->title_is( 'Invoice Status' );
>> $mech->title_is( 'Invoice Status', 'Page title is "Invoice
>> Status"' )
>>
>> Roughly? That sounds like a swell idea. Make it so. Thanks!
>>
>
> Exactly. Will do.
>
>>> Would you be open to adding some of these if I supplied a patch? I
>>> understand this would be a backward incompatibility since people
>>> would
>>> now get a default description instead of a blank one, but I'm not
>>> sure
>>> whether you consider this important.
>>
>> Better than a patch, I mean to move Mech over to code.google.com some
>> time, if you'd prefer to do it as a branch.
>>
>
> Sure. I was planning on doing this pretty soon (for myself, anyway)
> since I'm just starting a huge acceptance test suite and want to
> minimize the tedium. But I'm happy to wait until you get it up on
> code.google.com and create a branch - either way.
>
> Jon
>
>