fixed multiple style guide violations
This commit is contained in:
@ -38,7 +38,7 @@ describe CodeOcean::FilesController do
|
||||
expect_assigns(file: CodeOcean::File)
|
||||
|
||||
it 'destroys the file' do
|
||||
exercise = FactoryGirl.create(:fibonacci)
|
||||
FactoryGirl.create(:fibonacci)
|
||||
expect { request.call }.to change(CodeOcean::File, :count).by(-1)
|
||||
end
|
||||
|
||||
|
@ -60,7 +60,7 @@ describe ExecutionEnvironmentsController do
|
||||
let(:command) { 'which ruby' }
|
||||
|
||||
before(:each) do
|
||||
expect(DockerClient).to receive(:new).with(execution_environment: execution_environment, user: user).and_call_original
|
||||
expect(DockerClient).to receive(:new).with(execution_environment: execution_environment).and_call_original
|
||||
expect_any_instance_of(DockerClient).to receive(:execute_arbitrary_command).with(command)
|
||||
post :execute_command, command: command, id: execution_environment.id
|
||||
end
|
||||
|
@ -30,7 +30,7 @@ describe ExercisesController do
|
||||
end
|
||||
end
|
||||
|
||||
context "with a file upload" do
|
||||
context 'with a file upload' do
|
||||
let(:files_attributes) { {'0' => FactoryGirl.build(:file, content: fixture_file_upload('upload.rb', 'text/x-ruby')).attributes} }
|
||||
let(:request) { proc { post :create, exercise: exercise_attributes.merge(files_attributes: files_attributes) } }
|
||||
|
||||
@ -144,7 +144,7 @@ describe ExercisesController do
|
||||
|
||||
context 'when the score transmission succeeds' do
|
||||
before(:each) do
|
||||
expect(controller).to receive(:send_score).and_return({status: 'success'})
|
||||
expect(controller).to receive(:send_score).and_return(status: 'success')
|
||||
request
|
||||
end
|
||||
|
||||
@ -160,7 +160,7 @@ describe ExercisesController do
|
||||
|
||||
context 'when the score transmission fails' do
|
||||
before(:each) do
|
||||
expect(controller).to receive(:send_score).and_return({status: 'unsupported'})
|
||||
expect(controller).to receive(:send_score).and_return(status: 'unsupported')
|
||||
request
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user