diff --git a/spec/factories/stages.rb b/spec/factories/stages.rb index d033247..e8dce2d 100644 --- a/spec/factories/stages.rb +++ b/spec/factories/stages.rb @@ -12,5 +12,15 @@ FactoryBot.define do stage.groups = create_list(:group, evaluator.group_count) end end + + factory :playoff_stage do + level { rand(10) } + transient do + match_count { 4 } + end + after(:create) do |stage, evaluator| + stage.matches = create_list(:match, evaluator.match_count) + end + end end end