Sha256: 72c5ba8bd8cf041e511fdc16485325ab5c6265123828073da7f551ae0d7e6de2

Contents?: true

Size: 331 Bytes

Versions: 9

Compression:

Stored size: 331 Bytes

Contents

Factory.sequence(:product_group_sequence) {|n| "Product Group ##{n} - #{rand(9999)}"}

Factory.define :product_group do |f|
  f.name { Factory.next(:product_group_sequence) }

  f.product_scopes_attributes([
      { :name => "price_between", :arguments => [10,20]},
      {:name => "name_contains", :arguments => ["ruby"]}
  ])
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree-0.11.4 test/factories/product_group_factory.rb
spree-0.11.3 test/factories/product_group_factory.rb
spree-0.11.2 test/factories/product_group_factory.rb
spree-0.11.1 test/factories/product_group_factory.rb
spree-0.11.0 test/factories/product_group_factory.rb
spree-0.10.2 test/factories/product_group_factory.rb
spree-0.10.1 test/factories/product_group_factory.rb
spree-0.10.0 test/factories/product_group_factory.rb
spree-0.10.0.beta test/factories/product_group_factory.rb