Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.12
Fixed in: (no value)



Subject: PATCH: a better default for get_ok() test name
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1168536488-18020-8"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 247
Download (untitled) / with headers
text/plain 247b
This patch adds an intelligent default for the get_ok() test name, which is: successfully loaded $url Also, a reminder that I have a patch for submit_form_ok() sitting in the queue. I've been using it successfully for several months. Mark
Subject: test-mech.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1168536488-18020-7"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/x-patch; name="test-mech.patch"
Content-Disposition: inline; filename="test-mech.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 632
Download test-mech.patch
text/x-diff 632b
-- old-saveapet-1/perllib/Test/WWW/Mechanize.pm 2007-01-11 12:21:03.000000000 -0500 +++ new-saveapet-1/perllib/Test/WWW/Mechanize.pm 2007-01-11 12:21:03.000000000 -0500 @@ -76,6 +76,9 @@ well-behaved C<*_ok()> functions, it returns true if the test passed, or false if not. +A a default description of "successfully loaded $url" is used if none if +provided. + =cut sub get_ok { @@ -107,6 +110,7 @@ $self->get( $url, %opts ); my $ok = $self->success; + $desc = "succesfully loaded $url" unless defined $desc; $Test->ok( $ok, $desc ); if ( !$ok ) { $Test->diag( $self->status );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-9339-1193676558-703.24325-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 5
Done.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.