FactoryGirl.define do
  factory :product do
    title 'My favorite product'

    trait :with_stock
    stocks { FactoryGirl.build_list(:stock, 1) }
  end
end

FactoryGirl.define do
  factory :product do
    title 'My favorite product'

    trait :with_stock do
      stocks { build_list(:stock, 1) }
    end
  end
end

Fix syntax in product factory
Fix syntax in product factory
