This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/spec/factories/co_author_relations.rb

12 lines
347 B
Ruby

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