From 0950a601c56e29ee95924d94e0ef702bcf55cbd4 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Wed, 29 May 2019 23:22:43 +0200 Subject: [PATCH] Revert "A group_match always has match_scores attached" This reverts commit 78617793 --- spec/factories/matches.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/spec/factories/matches.rb b/spec/factories/matches.rb index e7ebed8..43fb55d 100644 --- a/spec/factories/matches.rb +++ b/spec/factories/matches.rb @@ -34,10 +34,13 @@ FactoryBot.define do factory :group_match, class: Match do group position { 0 } - transient do - match_scores_count { 2 } - end 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 { :in_progress } end @@ -50,9 +53,5 @@ FactoryBot.define do end state { :finished } end - - after(:create) do |match, evaluator| - match.match_scores = create_list(:match_score, evaluator.match_scores_count) - end end end