orbit-basic/spec/factories/co_author_relations.rb

13 lines
376 B
Ruby
Raw Normal View History

2012-12-06 14:05:22 +00:00
CoAuthorRelation.destroy_all
types = ["friend", "teacher", "student", "schoolmate", "parent", "best friend", "instructor", "labmate", "TA", "mate"]
FactoryGirl.define do
factory(:relations, class: "CoAuthorRelation") do |f|
f.sequence(:relation_translations) do |n|
{ zh_tw: "#{types[n%types.size]}",
en: "#{types[n%types.size]}" }
end
end
end