Sha256: b057145042ca3439575b584cfa93f35361b36090331784523283b7691ce2775d

Contents?: true

Size: 832 Bytes

Versions: 3

Compression:

Stored size: 832 Bytes

Contents

require 'spec_helper'

describe Fletcher, :vcr do
  describe :fetch, :vcr do
    it "should return correct model info" do
      product = Fletcher.fetch FactoryGirl.build(:steam).url
    end
  end 
end 

describe Fletcher::Model::Steam, :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(:steam).url)
        model.doc = nil
        model.description = ''
        model.name.should_not be_nil
        model.description.should_not be_nil
        model.description.class.should == String
        model.price.should_not be_nil
        model.images.should_not be_empty
        model.image.should_not be_nil
        model.image.src.should_not be_nil
      end       
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fletcher-0.6.5 spec/lib/fletcher/models/steam_spec.rb
fletcher-0.6.4 spec/lib/fletcher/models/steam_spec.rb
fletcher-0.6.2 spec/lib/fletcher/models/steam_spec.rb