Skip Menu |

This queue is for tickets about the Test-WWW-Mechanize-Catalyst CPAN distribution.

Report information
The Basics
Id: 22892
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize-Catalyst

People
Owner: Nobody in particular
Requestors: diment [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.29
  • 0.30
  • 0.31
  • 0.32
  • 0.33
  • 0.34
  • 0.35
  • 0.36
  • 0.37
Fixed in: (no value)



Subject: Doc patch
Documents the fact that the CATALYST_SERVER environment variable works with this module and briefly explains how to use it. I'm afraid the patch is against version 0.36, but hopefully that won't cause too much hassle.
Subject: TWMC.diff
--- Catalyst.pm 2006-11-08 14:37:55.000000000 +1100 +++ Catalyst.pm_mine 2006-11-08 14:47:18.000000000 +1100 @@ -101,7 +101,20 @@ applications but does not start a server or issue HTTP requests. Instead, it passes the HTTP request object directly to L<Catalyst>. Thus you do not need to use a real hostname: -"http://localhost/" will do. +"http://localhost/" will do. However, this is optional. The following +two lines of code do exactly the same thing: + + $mech->get_ok('/action'); + $mech->get_ok('http://localhost/action'); + +You can also test a remote server by setting the environment variable +CATALYST_SERVER, for example: + + $ CATALYST_SERVER=http://example.com/myapp prove -l t + +will run the same tests on the application running at +http://example.com/myapp regardless of whether or not you specify +http:://localhost for Test::WWW::Mechanize::Catalyst. This makes testing fast and easy. L<Test::WWW::Mechanize> provides functions for common web testing scenarios. For example:
Subject: Re: [rt.cpan.org #22892] AutoReply: Doc patch
Date: Wed, 8 Nov 2006 22:18:22 +1100
To: bug-Test-WWW-Mechanize-Catalyst [...] rt.cpan.org
From: "Kieren Diment" <diment [...] gmail.com>
Of course, the part of the patch saying that the http://localhost bit is optional is incorrect - this is required. However somewhat confusingly if CATALYST_SERVER is set then that server is used, not http://localhost On 08/11/06, Bugs in Test-WWW-Mechanize-Catalyst via RT < bug-Test-WWW-Mechanize-Catalyst@rt.cpan.org> wrote: Show quoted text
> > > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Doc patch", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #22892]. Your ticket is accessible > on the web at: > > http://rt.cpan.org/Ticket/Display.html?id=22892 > > Please include the string: > > [rt.cpan.org #22892] > > in the subject line of all future correspondence about this issue. To do > so, > you may reply to this message. > > Thank you, > bug-Test-WWW-Mechanize-Catalyst@rt.cpan.org > > ------------------------------------------------------------------------- > Documents the fact that the CATALYST_SERVER environment variable works > with this module and briefly explains how to use it. > > I'm afraid the patch is against version 0.36, but hopefully that won't > cause too much hassle. >
Thanks, this is in the new release.