Sha256: 285f938b5f7019b510a74cb2d93b2564f7182c9f3d7bc7dfdb24977f2a668c3b
Contents?: true
Size: 918 Bytes
Versions: 2
Compression:
Stored size: 918 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 memory_expectancy { create_memory_expectancy! } 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kuroko2-0.5.1 | spec/factories/job_definition_factory.rb |
kuroko2-0.5.0 | spec/factories/job_definition_factory.rb |