From 3716c9094c5f514c5ab95c902b7d2f04cade1934 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Fri, 10 May 2019 22:04:20 +0200 Subject: [PATCH] Performance Optimization In general this generates less unnecessary faker data --- .../add_group_stage_to_tournament_interactor_spec.rb | 4 ++-- .../add_playoffs_to_tournament_interactor_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/interactors/add_group_stage_to_tournament_interactor_spec.rb b/spec/interactors/add_group_stage_to_tournament_interactor_spec.rb index b64c752..0170d33 100644 --- a/spec/interactors/add_group_stage_to_tournament_interactor_spec.rb +++ b/spec/interactors/add_group_stage_to_tournament_interactor_spec.rb @@ -10,8 +10,8 @@ RSpec.describe AddGroupStageToTournament do end before do - @empty_tournament = create(:stage_tournament, stage_count: 0) - @group_stage_tournament = create(:group_stage_tournament) + @empty_tournament = create(:stage_less_tournament) + @group_stage_tournament = create(:group_stage_only_tournament, group_count: 0) @group_stage = create(:group_stage) @groups = Hash[1 => create_list(:team, 4), 2 => create_list(:team, 4)].values end diff --git a/spec/interactors/add_playoffs_to_tournament_interactor_spec.rb b/spec/interactors/add_playoffs_to_tournament_interactor_spec.rb index 056dc2b..d6353cf 100644 --- a/spec/interactors/add_playoffs_to_tournament_interactor_spec.rb +++ b/spec/interactors/add_playoffs_to_tournament_interactor_spec.rb @@ -14,10 +14,10 @@ RSpec.describe AddPlayoffsToTournament do end before do - @group_stage_tournament = create(:stage_tournament) - @playoff_stage_tournament = create(:tournament) - @full_tournament = create(:stage_tournament, stage_count: 5) - @stages = create_list(:stage, 5) + @group_stage_tournament = create(:group_stage_only_tournament, group_count: 0) + @playoff_stage_tournament = create(:stage_less_tournament) + @full_tournament = create(:dummy_stage_tournament) + @stages = create_list(:stage, 3) end context 'PlayoffStageService mocked' do