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