From 1dfee31079ee21b321a098f99721f8212fd3ba86 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 19 Oct 2021 23:52:59 +0200 Subject: [PATCH] Fix order-dependent execution_environments_controller_spec.rb --- spec/controllers/execution_environments_controller_spec.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/controllers/execution_environments_controller_spec.rb b/spec/controllers/execution_environments_controller_spec.rb index e01b300d..68f4ed45 100644 --- a/spec/controllers/execution_environments_controller_spec.rb +++ b/spec/controllers/execution_environments_controller_spec.rb @@ -200,15 +200,12 @@ describe ExecutionEnvironmentsController do let(:runner_management_config) { {runner_management: {enabled: true, strategy: :poseidon}} } before do + # Ensure to reset the memorized helper + Runner.instance_variable_set :@strategy_class, nil allow(CodeOcean::Config).to receive(:new).with(:code_ocean).and_return(codeocean_config) allow(codeocean_config).to receive(:read).and_return(runner_management_config) end - after do - # Reset the memorized helper - Runner.remove_instance_variable :@strategy_class - end - it 'copies all execution environments to the runner management' do allow(ExecutionEnvironment).to receive(:all).and_return(execution_environments)