require File.join(File.dirname(__FILE__), %w[.. spec_helper]) describe Scrapzirra::Injector do let(:feed) do Feedjira::Parser::Atom.parse(sample_atom_feed) end let(:injector) { Scrapzirra::Injector.new feed} let(:injected_feed) { injector.feed } subject { injected_feed } its(:title) { should eq("Amazon Web Services Blog")} its(:url) { should eq("http://aws.typepad.com/aws/")} describe '.scrap' do its(:"scrap.class") { should be(Scrapzirra::Scrap)} describe '.doc' do subject { injected_feed.scrap.doc } its(:class){ should be(Nokogiri::HTML::Document)} end end describe '.entries' do subject { feed.entries.first } its(:url) { should eq("http://aws.typepad.com/aws/2009/01/aws-job-architect-designer-position-in-turkey.html")} its(:"scrap.class") { should be(Scrapzirra::Scrap)} end end