Sha256: 45a3f81db2d8a29aa64b8a4fc1e2290d3e36135f87fcb20d6e46763f23c3096a
Contents?: true
Size: 873 Bytes
Versions: 11
Compression:
Stored size: 873 Bytes
Contents
require 'spec_helper' require 'helpers/sample_crawler' describe SampleCrawler do before(:each) do @sample_crawler = SampleCrawler.new end it 'should correctly assign event metadata' do @sample_crawler.should_receive(:parse) do |args| args['event_group'].wombat_property_selector.should == "css=div.title-agenda" it = args['event_group'] it["event"]["title"].wombat_property_selector.should == "xpath=." it["event"]["date"].wombat_property_selector.should == "xpath=//div[@class='scrollable-items']/div[@class='s-item active']//a" it["event"]["type"].wombat_property_selector.should == "xpath=.type" it["venue"]["name"].wombat_property_selector.should == "xpath=." args[:base_url].should == 'http://www.obaoba.com.br' args[:path].should == '/porto-alegre/agenda' end @sample_crawler.crawl end end
Version data entries
11 entries across 11 versions & 1 rubygems