2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-11-22 19:21:09 +00:00
|
|
|
Factory.define(:repository) do |p|
|
2011-11-29 14:36:51 +00:00
|
|
|
p.description { Factory.next(:string) }
|
|
|
|
p.name { Factory.next(:unixname) }
|
2011-11-22 19:21:09 +00:00
|
|
|
p.association :platform, :factory => :platform
|
2011-11-23 18:12:20 +00:00
|
|
|
end
|
|
|
|
|
2012-02-20 23:13:05 +00:00
|
|
|
Factory.define(:personal_repository, :parent => :repository) do |p|
|
|
|
|
p.after_create {|r|
|
|
|
|
r.platform.platform_type = 'personal'
|
|
|
|
r.platform.visibility = 'hidden'
|
|
|
|
r.platform.save!
|
2011-11-23 18:12:20 +00:00
|
|
|
}
|
2011-11-29 14:36:51 +00:00
|
|
|
end
|