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

Version Path
wombat-2.5.0 spec/sample_crawler_spec.rb
wombat-2.4.0 spec/sample_crawler_spec.rb
wombat-2.3.0 spec/sample_crawler_spec.rb
wombat-2.2.1 spec/sample_crawler_spec.rb
wombat-2.2.0 spec/sample_crawler_spec.rb
wombat-2.1.3 spec/sample_crawler_spec.rb
wombat-2.1.2 spec/sample_crawler_spec.rb
wombat-2.1.1 spec/sample_crawler_spec.rb
wombat-2.1.0 spec/sample_crawler_spec.rb
wombat-2.0.1 spec/sample_crawler_spec.rb
wombat-2.0.0 spec/sample_crawler_spec.rb