From 0f7279de97b9b415aad617aa64d6c47052545474 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Mon, 29 Apr 2019 22:11:21 +0200 Subject: [PATCH] Add running_group_match factory --- spec/factories/matches.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/factories/matches.rb b/spec/factories/matches.rb index 773151f..3f0a89c 100644 --- a/spec/factories/matches.rb +++ b/spec/factories/matches.rb @@ -16,5 +16,14 @@ FactoryBot.define do factory :group_match, class: Match do group + factory :running_group_match do + transient do + match_scores_count { 2 } + end + after(:create) do |match, evaluator| + match.match_scores = create_list(:match_score, evaluator.match_scores_count) + end + state { 3 } + end end end