Sha256: ffde8bb416f0b68bf600f93f119d4b36258dedc121b5a8bd45b6ed19a078b8de
Contents?: true
Size: 894 Bytes
Versions: 3
Compression:
Stored size: 894 Bytes
Contents
FactoryBot.define do factory :job_definition, class: Kuroko2::JobDefinition do name { 'Job Definition' } description { 'This is description for the job definition.' } script { "noop:\n" } admins { build_list(:user, 1) } prevent_multi { false } trait :with_revisions do transient do revisions_count { 1 } end after(:create) do |job_definition, evaluator| create_list(:script_revision, evaluator.revisions_count, job_definition: job_definition, script: "noop:\n") end end factory :job_definition_with_instances do transient do job_instances_count { 1 } job_instances_token_status { Kuroko2::Token::WORKING } end after(:create) do |job_definition, evaluator| create_list(:job_instance, evaluator.job_instances_count, job_definition: job_definition) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kuroko2-0.8.0 | spec/factories/job_definition_factory.rb |
kuroko2-0.7.0 | spec/factories/job_definition_factory.rb |
kuroko2-0.6.0 | spec/factories/job_definition_factory.rb |