Fix order-dependent execution_environments_controller_spec.rb
This commit is contained in:
@ -200,15 +200,12 @@ describe ExecutionEnvironmentsController do
|
|||||||
let(:runner_management_config) { {runner_management: {enabled: true, strategy: :poseidon}} }
|
let(:runner_management_config) { {runner_management: {enabled: true, strategy: :poseidon}} }
|
||||||
|
|
||||||
before do
|
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(:new).with(:code_ocean).and_return(codeocean_config)
|
||||||
allow(codeocean_config).to receive(:read).and_return(runner_management_config)
|
allow(codeocean_config).to receive(:read).and_return(runner_management_config)
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
|
||||||
# Reset the memorized helper
|
|
||||||
Runner.remove_instance_variable :@strategy_class
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'copies all execution environments to the runner management' do
|
it 'copies all execution environments to the runner management' do
|
||||||
allow(ExecutionEnvironment).to receive(:all).and_return(execution_environments)
|
allow(ExecutionEnvironment).to receive(:all).and_return(execution_environments)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user