Sha256: 88e28e9237f6d23e995e49464473656d8df5fd35056a7e11ece7c1a4df361704
Contents?: true
Size: 1.01 KB
Versions: 18
Compression:
Stored size: 1.01 KB
Contents
Factory.define :tie do |t| t.association :contact end # User ties Factory.define :friend, :parent => :tie do |t| t.after_build { |u| u.relation = u.sender.relation_custom('friend') } end Factory.define :acquaintance, :parent => :tie do |t| t.after_build { |u| u.relation = u.sender.relation_custom('acquaintance') } end Factory.define :public, :parent => :tie do |t| t.after_build { |u| u.relation = u.sender.relation_public } end # Group ties Factory.define :g2u_tie, :parent => :tie do |t| t.contact { |c| Factory(:group_contact) } end Factory.define :member, :parent => :g2u_tie do |t| t.after_build { |u| u.relation = u.sender.relation_custom('member') } end Factory.define :g2g_tie, :parent => :tie do |t| t.contact { |c| Factory(:g2g_contact) } end Factory.define :partner, :parent => :g2g_tie do |t| t.after_build { |u| u.relation = u.sender.relation_custom('partner') } end Factory.define :group_public, :parent => :g2g_tie do |t| t.after_build { |u| u.relation = u.sender.relation_public } end
Version data entries
18 entries across 18 versions & 1 rubygems