From 279973ac22836695bc2bb08729b55ae12b881235 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Thu, 25 Apr 2019 10:14:07 +0200 Subject: [PATCH] someone will hopefully suqash this --- spec/factories/groups.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb index c802ce4..839c230 100644 --- a/spec/factories/groups.rb +++ b/spec/factories/groups.rb @@ -2,8 +2,15 @@ FactoryBot.define do factory :group do + transient do + match_count { 4 } + end + sequence(:number) stage - group_match + + after(:create) do |group, evaluator| + create_list(:group_match, evaluator.match_count, group: group) + end end end