Sha256: 12ee3f3b0957775059f457dfccfe137d1a9e098d849867b951dffe86d2cec31e

Contents?: true

Size: 1.93 KB

Versions: 4

Compression:

Stored size: 1.93 KB

Contents

require "hashie"

FactoryGirl.define do
  factory :base, :class => Fletcher::Model::Base  do
    url "http://www.example.com"  
  end

  factory :sample, :parent => :base  do
    url "http://www.example.com"
    name "Sample Model"
    description "This is a sample description."
    raw_price "$5.00"   
  end

  factory :invalid, :parent => :base do
    url "http://invalid"
  end  

  factory :valid, :parent => :base do
    url "http://www.amazon.com/Kindle-Fire-Amazon-Tablet/dp/B0051VVOB2"
    title_xpath "//h1[@class='parseasinTitle']"
    images_xpath "//table[@class='productImageGrid']//img"
  end

  factory :amazon, :parent => :base do
    url "http://www.amazon.com/gp/product/B004HZYA6E/"
  end

  # This may need to be updated if the item is expired/deleted
  factory :ebay, :parent => :base do
    url "http://www.ebay.com/itm/Franklin-Library-3V-ESSAYS-MONTAIGNE-Leather-Great-Books-1979-Donald-Frame-/190654183378"
  end

  factory :thinkgeek, :parent => :base do
    url "http://www.thinkgeek.com/geektoys/plush/e7f8/"
  end

  # ThinkGeek Product with hyphenated price range
  factory :thinkgeek_with_price_range, :parent => :base do
    url "http://www.thinkgeek.com/product/f131/?pfm=tshirts-apparel_newest_f131_1"
  end 

  factory :etsy, :parent => :base do
    url "http://www.etsy.com/listing/78608690/farm-fresh-125-x-19-in-pick-your-color"
  end

  factory :googleshopping, :parent => :base do
    url "http://www.google.com/products/catalog?hl=en&q=xbox+360&um=1&ie=UTF-8&tbm=shop&cid=6970582693578667145&sa=X&ei=-UAuUOi7G4P80QX8hYHwDA"
  end
  
  factory :gamecouk, :parent => :base do
    url "http://www.game.co.uk/en/rise-of-nightmares-kinect-compatible-93535"
  end
  
  factory :playcom, :parent => :base do
    url "http://www.play.com/DVD/DVD/4-/14805648/-/Product.html"
  end

  factory :steam, :parent=> :base do
    url "http://store.steampowered.com/app/212580/"
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fletcher-0.6.1 spec/factories/models.rb
fletcher-0.6.0 spec/factories/models.rb
fletcher-0.5.2 spec/factories/models.rb
fletcher-0.5.1 spec/factories/models.rb