解决方法
结帐
this answer – 使用Array#示例:
FactoryGirl.define do factory :user do name "Foo Bar" foo { [:a,:list,:of,:values].sample } end end