Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user