Sha256: f23b22545c8dab37a9c5f4b51268206e300286107dc1544f278138548b8e938f
Contents?: true
Size: 787 Bytes
Versions: 2
Compression:
Stored size: 787 Bytes
Contents
require 'spec_helper' require 'helpers/sample_crawler' describe SampleCrawler do before(:each) do @sample_crawler = SampleCrawler.new @sample_crawler.parser = Wombat::Parser.new end it 'should correctly assign event metadata' do @sample_crawler.parser.should_receive(:parse) do |args| args.event_props.get_property("title").selector.should == "Sample Event" args.event_props.get_property("description").selector.should == "This event's description" args.event_props.get_property("date").selector.should == DateTime.now.to_date args.venue_props.get_property("name").selector.should == "Cafe de La Musique" args.venue_props.get_property("address").selector.should == "324 Dom Pedro II Street" end @sample_crawler.crawl end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wombat-0.1.2 | spec/sample_crawler_spec.rb |
wombat-0.1.1 | spec/sample_crawler_spec.rb |