Sha256: 859a34572ebd54f650f61decfa681925455bb35c04a956773d1f1a0dc2530a27

Contents?: true

Size: 734 Bytes

Versions: 4

Compression:

Stored size: 734 Bytes

Contents

require 'spec_helper'
require 'helpers/sample_crawler'

describe SampleCrawler do
  before(:each) do
    @sample_crawler = SampleCrawler.new
  end

  xit 'should correctly assign event metadata' do
    @sample_crawler.should_receive(:parse) do |args|
      args.event["title"].selector.should == "xpath=."
      args.event["description"].selector.should == "css=#main-node-content"
      args.event["date"].selector.should == DateTime.now.to_date

      args.venue["name"].selector.should == "Cafe de La Musique"
      args.venue["address"].selector.should == "324 Dom Pedro II Street"

      args[:base_url].should == 'http://www.google.com/'
      args[:list_page].should == 'shows.php'
    end

    @sample_crawler.crawl
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wombat-0.1.6 spec/sample_crawler_spec.rb
wombat-0.1.5 spec/sample_crawler_spec.rb
wombat-0.1.4 spec/sample_crawler_spec.rb
wombat-0.1.3 spec/sample_crawler_spec.rb