Sha256: a1a7f46f1d581ff3b3926f96c3e040ae2f179ecaaec33099def859ac8c9b5382
Contents?: true
Size: 498 Bytes
Versions: 6
Compression:
Stored size: 498 Bytes
Contents
FactoryGirl.define do factory :variant, :class => Spree::Variant do price 19.99 cost_price 17.00 sku { Faker::Lorem.sentence } weight { BigDecimal.new("#{rand(200)}.#{rand(99)}") } height { BigDecimal.new("#{rand(200)}.#{rand(99)}") } width { BigDecimal.new("#{rand(200)}.#{rand(99)}") } depth { BigDecimal.new("#{rand(200)}.#{rand(99)}") } # associations: product { |p| p.association(:product) } option_values { [Factory(:option_value)] } end end
Version data entries
6 entries across 6 versions & 1 rubygems