Sha256: 3c2b5c6abbc7cd87ee2655c3c2754dcf03b973e33e962b3c48a2118b239fc45a
Contents?: true
Size: 624 Bytes
Versions: 5
Compression:
Stored size: 624 Bytes
Contents
require File.join(File.dirname(__FILE__), %w[.. spec_helper]) describe Scrapzirra::Scrap do let(:scrap) { Scrapzirra::Scrap.new nil, doc: open("#{File.dirname(__FILE__)}/../sample_feeds/swartz.html")} describe '.doc' do subject { scrap.doc } its(:class){ should be(Nokogiri::HTML::Document)} describe '.css' do subject { scrap.doc.css('article header h1').collect{|a| a.content }.inject(:+) } it { should match(/Aaron Swartz/) } end end describe '.selector_content' do subject { scrap.selector_content('article header h1')} it { should match(/dziecko internetu/) } end end
Version data entries
5 entries across 5 versions & 1 rubygems