[SP-pm] WWW::Mechanize, erro no teste: t/live/computers4sure.t

Daniel de Oliveira Mantovani daniel.oliveira.mantovani at gmail.com
Mon Jan 12 08:17:30 PST 2009


<code>

--- computers4sure.t    2008-09-30 15:15:09.000000000 -0300
+++ teste.pl    2009-01-12 14:10:48.000000000 -0200
@@ -20,8 +20,8 @@
 is( $mech->response->code, 200, "Fetched $first_page" );
 ok( $mech->content =~ /Support/, 'Found a likely word in the first page' );

-my @links = $mech->find_all_links( url_regex =>
qr{product\.asp\?productid=} );
-cmp_ok( scalar @links, '>', 10, 'Should have lots of product links' );
+my @links = $mech->find_all_links( url_regex => qr{category\.asp\?catId=}
);
+cmp_ok( scalar @links, '>', 30, 'Should have lots of product links' );

 my $link = $links[@links/2]; # Pick one in the middle
 isa_ok( $link, 'WWW::Mechanize::Link' );
@@ -31,7 +31,7 @@
 # comes back gzipped.
 $mech->get( $link_str );
 is( $mech->response->code, 200, "Fetched $link_str" );
-ok( $mech->content =~ /Your price/i, 'Found a likely phrase in the second
page' );
+ok( $mech->content =~ /For a listing of more/i, 'Found a likely phrase in
the second page' );

 SKIP: {
     eval 'use Test::Memory::Cycle';

</code>

2009/1/12 Otávio Fernandes <otaviof em gmail.com>

> Não Daniel, acho que eu não fui claro. Quando eu disse "diff"
> significa: "$ diff -u file.pl.orig file.pl". O retorno disso você cola
> aqui na lista, assim nós podemos ver o que você mudou.
>
> um abraço,
>
> --
> Otávio Fernandes <otaviof at gmail.com>
> http://otaviof.blogspot.com/
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>



-- 
http://mantovanihouse.blogspot.com/

-------(\_------------_/)-----------
-------)--(----------)--(-----------
------(----(---------)----)----------
-------)----(-------)----(-----------
-------(----(-------)----)-----------
--------\_-(\\.---.//)-_/------------
----------\)' -8--8- '(/--------------
-----------/------------\---------------
----------(--)--------(--)--------------
------------(_c__c_)----------------
----------------------------------------
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20090112/e68246fc/attachment.html>


More information about the SaoPaulo-pm mailing list