Sha256: 485c859a9b816f5a9a83d20f7ee34f76674e14148c1a42f3eeea6644977d6a12
Contents?: true
Size: 902 Bytes
Versions: 2
Compression:
Stored size: 902 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 eq "css=div.title-agenda" it = args['event_group'] expect(it["event"]["title"].wombat_property_selector).to eq("xpath=.") expect(it["event"]["date"].wombat_property_selector).to( eq("xpath=//div[@class='scrollable-items']/div[@class='s-item active']//a")) expect(it["event"]["type"].wombat_property_selector).to eq("xpath=.type") expect(it["venue"]["name"].wombat_property_selector).to eq("xpath=.") args[:base_url].should eq 'http://www.obaoba.com.br' args[:path].should eq '/porto-alegre/agenda' end @sample_crawler.crawl end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wombat-3.0.0 | spec/sample_crawler_spec.rb |
wombat-2.10.0 | spec/sample_crawler_spec.rb |