Sha256: b5394be1aa7769134d2b445fb6a7e202211ab4b4c00a7abc9602aff018b3e945

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

describe Rawler::Crawler do

  context "content type" do
      
    ['text/plain', 'text/css', 'image/jpeg'].each do |content_type|
    
      let(:url)     { 'http://example.com' }
      let(:crawler) { Rawler::Crawler.new(url) }
    
      before(:each) do
        register(url, '', 200, :content_type => content_type)
      end
    
      it "should ignore '#{content_type}'" do
        crawler.links.should == []
      end
  
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rawler-0.0.5 spec/unit/crawler/content_type_spec.rb