rosa-build/spec/factories/platforms.rb

19 lines
496 B
Ruby
Raw Normal View History

FactoryGirl.define do
factory :platform do
name { FactoryGirl.generate(:unixname) }
2015-02-19 01:12:08 +00:00
default_branch { |p| p.name }
description { FactoryGirl.generate(:string) }
platform_type 'main'
distrib_type APP_CONFIG['distr_types'].first
2014-01-21 04:51:49 +00:00
association :owner, factory: :user
factory :platform_with_repos do
after(:create) {|p| FactoryGirl.create_list(:repository, 1, platform: p)}
end
factory :personal_platform do
platform_type 'personal'
end
end
2012-01-30 20:39:34 +00:00
end