Sha256: 4276012843b38afb4195a6e2e8118f545577cb557ae9465dda5dbec06c46e20d
Contents?: true
Size: 626 Bytes
Versions: 16
Compression:
Stored size: 626 Bytes
Contents
require 'spec_helper' describe Wombat::Property::Locators::Headers do it 'should fetch a list of HTTPResponse headers filtered by a regexp' do VCR.use_cassette('headers_selector') do regex = "^s.*" # filter headers like: server, status or set-cookie result = Wombat.crawl do base_url "http://www.github.com" path "/" headers regex, :headers end result.should_not be_nil result['headers'].size.should >= 1 result['headers'].should_not be_nil result['headers'].each do |key, value| key.match(regex).should_not be_nil end end end end
Version data entries
16 entries across 16 versions & 1 rubygems