diff --git a/spec/factories/tournaments.rb b/spec/factories/tournaments.rb index ce7ad76..610d88a 100644 --- a/spec/factories/tournaments.rb +++ b/spec/factories/tournaments.rb @@ -12,6 +12,15 @@ FactoryBot.define do tournament.teams = create_list(:team, evaluator.teams_count, tournament: tournament) end + factory :group_stage_only_tournament do + transient do + group_count { 2 } + end + after(:create) do |tournament, evaluator| + tournament.stages.concat create_list(:group_stage, 1, group_count: evaluator.group_count) + end + end + factory :stage_tournament do transient do stage_count { 1 }