Sha256: 3b08c67d7fa7d47916910d86560dbb469f3e13455fe2a7c70ddaeb511fef79da
Contents?: true
Size: 759 Bytes
Versions: 7
Compression:
Stored size: 759 Bytes
Contents
require 'spec_helper' describe Fletcher::Nokogiri::HTML::Document do end describe Fletcher::Nokogiri::XML::NodeSet, :vcr do before :each do @doc = Fletcher::Data.read(FactoryGirl.build(:valid).url) end describe "first_string", :vcr do it "should return a valid string" do nodeset = @doc.xpath(FactoryGirl.build(:valid).title_xpath) string = nodeset.first_string string.should_not be_nil end end describe "attribute_array", :vcr do it "should return an array of attribute hashes" do nodeset = @doc.xpath(FactoryGirl.build(:valid).images_xpath) attribute_array = nodeset.attribute_array attribute_array.class.should == Array end end end
Version data entries
7 entries across 7 versions & 1 rubygems