Sha256: fa5b1ba23700274bb93cc13cd93de5159db299bdb3569fa95b8047e398b8e4fe
Contents?: true
Size: 761 Bytes
Versions: 4
Compression:
Stored size: 761 Bytes
Contents
require 'test_helper' class TestLinkScraper < Test::Unit::TestCase def setup @scraper = Spieker::LinkScraper.new('http://supersimple.st.tolq.com') end def test_apphost assert_equal 'http://supersimple.st.tolq.com', @scraper.app_host end def test_result #assert @scraper.result.any? end def test_filter_local found_links = [ 'http://supersimple.st.tolq.com/local', '/local', '/local#justahash', '#justahash', 'http://www.remote.com', 'mailto:timonv@gmail.com', 'javascript', 'pdf' ] expected_links = [ 'http://supersimple.st.tolq.com/local', '/local', '' ] @scraper.links = found_links assert_equal expected_links, @scraper.result end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
spieker-0.0.10 | test/link_scraper_test.rb |
spieker-0.0.9 | test/link_scraper_test.rb |
spieker-0.0.8 | test/link_scraper_test.rb |
spieker-0.0.7 | test/link_scraper_test.rb |