Sha256: 42a6e5b0d75407f83f99aed0ab305de84f71afffa915e404c64731f7623b5b44
Contents?: true
Size: 645 Bytes
Versions: 1
Compression:
Stored size: 645 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' describe Rawler::Crawler do context "url domain" do let(:content) { content = <<-content <a href="http://example.com/valid">foo</a> <a href="mailto:info@example.com">invalid</a> <a href="https://foo.com">valid</a> content } let(:url) { 'http://example.com' } let(:crawler) { Rawler::Crawler.new(url) } before(:each) do register(url, content) end it "should ignore links other than http or https" do crawler.links.should == ['http://example.com/valid', 'https://foo.com'] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rawler-0.0.5 | spec/unit/crawler/url_domain_spec.rb |