Sha256: 902fa63f90d081732e39c7ac4c52e410fd2b70ba2eb87ff0bb6beb389ead3653
Contents?: true
Size: 744 Bytes
Versions: 5
Compression:
Stored size: 744 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") require 'test/unit' require 'rubygems' require 'mechanize' require 'test_includes' class LinksMechTest < Test::Unit::TestCase include TestMethods def test_find_meta agent = WWW::Mechanize.new { |a| a.log = Logger.new(nil) } page = agent.get("http://localhost:#{@port}/find_link.html") assert_equal(2, page.meta.length) assert_equal("http://www.drphil.com/", page.meta[0].href.downcase) assert_equal("http://www.upcase.com/", page.meta[1].href.downcase) end def test_find_link agent = WWW::Mechanize.new { |a| a.log = Logger.new(nil) } page = agent.get("http://localhost:#{@port}/find_link.html") assert_equal(15, page.links.length) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mechanize-0.4.1 | test/tc_links.rb |
mechanize-0.4.2 | test/tc_links.rb |
mechanize-0.4.4 | test/tc_links.rb |
mechanize-0.4.3 | test/tc_links.rb |
mechanize-0.4.5 | test/tc_links.rb |