debian-mirror-gitlab/spec/factories/ml/candidates.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
482 B
Ruby
Raw Normal View History

2022-10-11 01:57:18 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :ml_candidates, class: '::Ml::Candidate' do
association :experiment, factory: :ml_experiments
association :user
2022-11-25 23:54:43 +05:30
trait :with_metrics_and_params do
after(:create) do |candidate|
candidate.metrics = FactoryBot.create_list(:ml_candidate_metrics, 2, candidate: candidate )
candidate.params = FactoryBot.create_list(:ml_candidate_params, 2, candidate: candidate )
end
end
2022-10-11 01:57:18 +05:30
end
end