Sha256: c7bdc1cf4f45d15c308f0d048eeae5634eea5843421b93ed91ae8abdb20646db

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

require 'spec_helper'

describe Fletcher, :vcr do
  describe :fetch, :vcr do
   
  end 
end 

describe Fletcher, :vcr do
  describe :fetch, :vcr do
    it "should fetch a thinkgeek product's information" do
      item = Fletcher.fetch(FactoryGirl.build(:thinkgeek).url)
      item.should_not be_nil
      item.image.should_not be_nil
      item.name.should_not be_nil       
      item.description.should_not be_nil 
    end   

    it "should fetch a thinkgeek product with price range" do
      item = Fletcher.fetch(FactoryGirl.build(:thinkgeek_with_price_range).url)
      item.should_not be_nil
      item.image.should_not be_nil
      item.name.should_not be_nil       
      item.description.should_not be_nil 
    end      
  end 
end 

describe Fletcher::Model::Thinkgeek, :vcr do
  describe "parse" do     
    context "with valid data" do
      it "should return correct model info" do 
        model = described_class.new
        model.parse Fletcher::Data.read(FactoryGirl.build(:thinkgeek).url)  
        model.name.should_not be_nil
        model.price.should_not be_nil                
        model.image.should_not be_nil        
      end       
    end
  end
end  

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fletcher-0.6.9 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.8 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.7 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.6 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.5 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.4 spec/lib/fletcher/models/thinkgeek_spec.rb
fletcher-0.6.2 spec/lib/fletcher/models/thinkgeek_spec.rb