Sha256: 0fd9758dacb8550c78188e0f71ef17cec19f0be91d17af446c9d3cc88dca765a

Contents?: true

Size: 729 Bytes

Versions: 5

Compression:

Stored size: 729 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(Factory(:valid).url)
  end  
   
  describe "first_string", :vcr do
    it "should return a valid string" do
      nodeset = @doc.xpath(Factory(: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(Factory(:valid).images_xpath)
      attribute_array = nodeset.attribute_array 
      attribute_array.class.should == Array
    end       
  end
end 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fletcher-0.6.1 spec/lib/fletcher/nokogiri_spec.rb
fletcher-0.6.0 spec/lib/fletcher/nokogiri_spec.rb
fletcher-0.5.2 spec/lib/fletcher/nokogiri_spec.rb
fletcher-0.5.1 spec/lib/fletcher/nokogiri_spec.rb
fletcher-0.5.0 spec/lib/fletcher/nokogiri_spec.rb