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
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
-- 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 );
Done.