Fix Rubocop offenses

This commit is contained in:
Sebastian Serth
2023-07-31 08:39:14 +02:00
parent a8f368b861
commit 8f446c04a9
6 changed files with 10 additions and 22 deletions

View File

@ -6,8 +6,7 @@ describe ExecutionEnvironment do
let(:execution_environment) { described_class.create.tap {|execution_environment| execution_environment.update(network_enabled: nil, privileged_execution: nil) } }
it 'validates that the Docker image works' do
allow(execution_environment).to receive(:validate_docker_image?).and_return(true)
allow(execution_environment).to receive(:working_docker_image?).and_return(true)
allow(execution_environment).to receive_messages(validate_docker_image?: true, working_docker_image?: true)
execution_environment.update(build(:ruby).attributes)
expect(execution_environment).to have_received(:working_docker_image?)
end

View File

@ -56,8 +56,7 @@ describe Runner do
let(:runner) { described_class.create }
before do
allow(strategy_class).to receive(:request_from_management).and_return(runner_id)
allow(strategy_class).to receive(:new).and_return(strategy)
allow(strategy_class).to receive_messages(request_from_management: runner_id, new: strategy)
end
it 'delegates to its strategy' do
@ -73,8 +72,7 @@ describe Runner do
let(:connection) { instance_double(Runner::Connection) }
before do
allow(strategy_class).to receive(:request_from_management).and_return(runner_id)
allow(strategy_class).to receive(:new).and_return(strategy)
allow(strategy_class).to receive_messages(request_from_management: runner_id, new: strategy)
allow(event_loop).to receive(:wait)
allow(connection).to receive(:error).and_return(nil)
allow(Runner::EventLoop).to receive(:new).and_return(event_loop)
@ -128,8 +126,7 @@ describe Runner do
let(:runner) { described_class.create }
before do
allow(strategy_class).to receive(:request_from_management).and_return(runner_id)
allow(strategy_class).to receive(:new).and_return(strategy)
allow(strategy_class).to receive_messages(request_from_management: runner_id, new: strategy)
end
it 'delegates to its strategy' do