Commit 55aa2d1f authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'mb_rails_save_bang_fix2' into 'master'

Fix Rails/SaveBang offenses

See merge request gitlab-org/gitlab!44820
parents 87505699 f917024b
......@@ -1170,9 +1170,6 @@ Rails/SaveBang:
- 'spec/support/shared_contexts/email_shared_context.rb'
- 'spec/support/shared_contexts/finders/group_projects_finder_shared_contexts.rb'
- 'spec/support/shared_contexts/mailers/notify_shared_context.rb'
- 'spec/tasks/gitlab/web_hook_rake_spec.rb'
- 'spec/uploaders/file_uploader_spec.rb'
- 'spec/uploaders/object_storage_spec.rb'
# Offense count: 187
# Cop supports --auto-correct.
......
---
title: Fix Rails/SaveBang offenses in spec/uploaders/* and spec/tasks/
merge_request: 44820
author: matthewbried
type: other
......@@ -36,7 +36,7 @@ RSpec.describe 'gitlab:web_hook namespace rake tasks' do
it 'raises an error if an unknown namespace is specified' do
stub_env('URL' => url, 'NAMESPACE' => group.full_path)
group.destroy
group.destroy!
expect { run_rake_task('gitlab:web_hook:add') }.to raise_error(SystemExit)
end
......@@ -69,7 +69,7 @@ RSpec.describe 'gitlab:web_hook namespace rake tasks' do
it 'raises an error if an unknown namespace is specified' do
stub_env('URL' => url, 'NAMESPACE' => group.full_path)
group.destroy
group.destroy!
expect { run_rake_task('gitlab:web_hook:rm') }.to raise_error(SystemExit)
end
......
......@@ -285,7 +285,7 @@ RSpec.describe FileUploader do
end
let!(:fog_file) do
fog_connection.directories.new(key: 'uploads').files.create(
fog_connection.directories.new(key: 'uploads').files.create( # rubocop:disable Rails/SaveBang
key: 'tmp/uploads/test/123123',
body: 'content'
)
......
......@@ -795,7 +795,7 @@ RSpec.describe ObjectStorage do
end
let!(:fog_file) do
fog_connection.directories.new(key: 'uploads').files.create(
fog_connection.directories.new(key: 'uploads').files.create( # rubocop:disable Rails/SaveBang
key: 'tmp/uploads/test/123123',
body: 'content'
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment