spree/spree — pull request #1215 by jdutil (2012-03-02 06:01:08+00:00)
Title: Fix product factory.

Note quite sure why but after the update to factory girl I started receiving in Ruby 1.9.3 issues with rand returning nil:

```
Failures:

1) Spree::Admin::ProductsController creating a product should create product
Failure/Error: post :create, :product => product_attributes
NoMethodError:
undefined method `+' for nil:NilClass
# ./lib/spree/core/testing_support/factories/product_factory.rb:6:in `block (3 levels) in '
# ./spec/controllers/spree/admin/products_controller_spec.rb:62:in `block (3 levels) in '

2) Spree::Admin::ProductsController creating a product should create product from prototype
Failure/Error: post :create, :product => product_attributes.merge(:prototype_id => prototype.id)
NoMethodError:
undefined method `+' for nil:NilClass
# ./lib/spree/core/testing_support/factories/product_factory.rb:6:in `block (3 levels) in '
# ./spec/controllers/spree/admin/products_controller_spec.rb:67:in `block (3 levels) in '

3) Spree::Admin::ProductsController creating a product should create product from prototype with option values hash
Failure/Error: post :create, :product => product_attributes.merge(:prototype_id => prototype.id, :option_values_hash => option_values_hash)
NoMethodError:
undefined method `+' for nil:NilClass
# ./lib/spree/core/testing_support/factories/product_factory.rb:6:in `block (3 levels) in '
# ./spec/controllers/spree/admin/products_controller_spec.rb:80:in `block (3 levels) in '

Finished in 636.29 seconds
829 examples, 3 failures, 35 pending
```