rosa-build/spec/factories/platforms.rb

19 lines
490 B
Ruby
Raw Normal View History

2012-01-30 20:39:34 +00:00
# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :platform do
name { FactoryGirl.generate(:unixname) }
description { FactoryGirl.generate(:string) }
platform_type 'main'
distrib_type APP_CONFIG['distr_types'].first
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