Fix order-dependent execution_environments_controller_spec.rb

This commit is contained in:
Sebastian Serth
2021-10-19 23:52:59 +02:00
parent 9cc4394296
commit 1dfee31079

View File

@ -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)