Fix rubocop offenses - Requires Ruby 3.1+

This commit is contained in:
Sebastian Serth
2022-11-25 10:53:14 +01:00
parent bdf474e684
commit 574e99eddd
93 changed files with 315 additions and 315 deletions

View File

@@ -4,7 +4,7 @@ require 'rails_helper'
describe ProformaService::ExportTask do
describe '.new' do
subject(:export_task) { described_class.new(exercise: exercise) }
subject(:export_task) { described_class.new(exercise:) }
let(:exercise) { build(:dummy) }
@@ -22,15 +22,15 @@ describe ProformaService::ExportTask do
end
describe '#execute' do
subject(:export_task) { described_class.call(exercise: exercise) }
subject(:export_task) { described_class.call(exercise:) }
let(:task) { Proforma::Task.new }
let(:exercise) { build(:dummy) }
let(:exporter) { instance_double(Proforma::Exporter, perform: 'zip') }
before do
allow(ProformaService::ConvertExerciseToTask).to receive(:call).with(exercise: exercise).and_return(task)
allow(Proforma::Exporter).to receive(:new).with(task: task, custom_namespaces: [{prefix: 'CodeOcean', uri: 'codeocean.openhpi.de'}]).and_return(exporter)
allow(ProformaService::ConvertExerciseToTask).to receive(:call).with(exercise:).and_return(task)
allow(Proforma::Exporter).to receive(:new).with(task:, custom_namespaces: [{prefix: 'CodeOcean', uri: 'codeocean.openhpi.de'}]).and_return(exporter)
end
it do