Change .map to .each
This commit is contained in:
parent
dcb19461be
commit
d548eee245
|
|
@ -27,10 +27,8 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
after(:create) do |tournament, evaluator|
|
after(:create) do |tournament, evaluator|
|
||||||
# this is basically a manual create_list as we need to count up the level of the stage
|
# this is basically a manual create_list as we need to count up the level of the stage
|
||||||
levels = 1..evaluator.stage_count
|
(1..evaluator.stage_count).each do |level|
|
||||||
|
tournament.stages << create(:playoff_stage,
|
||||||
tournament.stages.concat(levels.map do |level|
|
|
||||||
create(:playoff_stage,
|
|
||||||
level: level,
|
level: level,
|
||||||
match_count: -1,
|
match_count: -1,
|
||||||
match_type: if evaluator.stage_count
|
match_type: if evaluator.stage_count
|
||||||
|
|
@ -38,7 +36,7 @@ FactoryBot.define do
|
||||||
else
|
else
|
||||||
:empty_prepared_playoff_match
|
:empty_prepared_playoff_match
|
||||||
end)
|
end)
|
||||||
end)
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :group_stage_tournament do
|
factory :group_stage_tournament do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue