Sha256: 6afe1272a3b189cd27ffd60f6f112583c65fd12d242b56f4ca8a1cd63cd458d4
Contents?: true
Size: 984 Bytes
Versions: 11
Compression:
Stored size: 984 Bytes
Contents
Factory.define :tie do |t| t.sender { |s| Factory(:user).actor } t.receiver { |r| Factory(:user).actor } end # User ties Factory.define :friend, :parent => :tie do |t| t.after_build { |u| u.relation = u.sender.relation('friend') } end Factory.define :acquaintance, :parent => :tie do |t| t.after_build { |u| u.relation = u.sender.relation('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.sender { |u| Factory(:group).actor } end Factory.define :member, :parent => :g2u_tie do |t| t.after_build { |u| u.relation = u.sender.relation('member') } end Factory.define :g2g_tie, :parent => :tie do |t| t.sender { |u| Factory(:group).actor } t.receiver { |u| Factory(:group).actor } end Factory.define :partner, :parent => :g2g_tie do |t| t.after_build { |u| u.relation = u.sender.relation('partner') } end
Version data entries
11 entries across 11 versions & 1 rubygems