Commit 70a2fd8b authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'rails-save-bang-37' into 'master'

Fixes Rails/SaveBang cop for spec files in spec/lib/gitlab/git/*

See merge request gitlab-org/gitlab!43013
parents b1beab8b ae1fdfec
...@@ -949,9 +949,6 @@ Rails/SaveBang: ...@@ -949,9 +949,6 @@ Rails/SaveBang:
- 'spec/lib/gitlab/email/handler/create_note_handler_spec.rb' - 'spec/lib/gitlab/email/handler/create_note_handler_spec.rb'
- 'spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb' - 'spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb'
- 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb'
- 'spec/lib/gitlab/git/object_pool_spec.rb'
- 'spec/lib/gitlab/git/remote_mirror_spec.rb'
- 'spec/lib/gitlab/git/repository_spec.rb'
- 'spec/lib/gitlab/git_access_spec.rb' - 'spec/lib/gitlab/git_access_spec.rb'
- 'spec/lib/gitlab/gitaly_client/object_pool_service_spec.rb' - 'spec/lib/gitlab/gitaly_client/object_pool_service_spec.rb'
- 'spec/lib/gitlab/gitaly_client/repository_service_spec.rb' - 'spec/lib/gitlab/gitaly_client/repository_service_spec.rb'
......
---
title: Fixes Rails/SaveBang cop for spec files in spec/lib/gitlab/git/*
merge_request: 43013
author: Rajendra Kadam
type: other
...@@ -19,7 +19,7 @@ RSpec.describe Gitlab::Git::ObjectPool do ...@@ -19,7 +19,7 @@ RSpec.describe Gitlab::Git::ObjectPool do
describe '#create' do describe '#create' do
before do before do
subject.create subject.create # rubocop:disable Rails/SaveBang
end end
context "when the pool doesn't exist yet" do context "when the pool doesn't exist yet" do
...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::Git::ObjectPool do ...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::Git::ObjectPool do
context 'when the pool already exists' do context 'when the pool already exists' do
it 'raises an FailedPrecondition' do it 'raises an FailedPrecondition' do
expect do expect do
subject.create subject.create # rubocop:disable Rails/SaveBang
end.to raise_error(GRPC::FailedPrecondition) end.to raise_error(GRPC::FailedPrecondition)
end end
end end
......
...@@ -16,7 +16,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do ...@@ -16,7 +16,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do
.to receive(:update_remote_mirror) .to receive(:update_remote_mirror)
.with(ref_name, ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS', keep_divergent_refs: true) .with(ref_name, ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS', keep_divergent_refs: true)
remote_mirror.update remote_mirror.update # rubocop:disable Rails/SaveBang
end end
it 'wraps gitaly errors' do it 'wraps gitaly errors' do
...@@ -24,7 +24,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do ...@@ -24,7 +24,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do
.to receive(:update_remote_mirror) .to receive(:update_remote_mirror)
.and_raise(StandardError) .and_raise(StandardError)
expect { remote_mirror.update }.to raise_error(StandardError) expect { remote_mirror.update }.to raise_error(StandardError) # rubocop:disable Rails/SaveBang
end end
end end
end end
...@@ -2079,7 +2079,7 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do ...@@ -2079,7 +2079,7 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do
let(:object_pool_rugged) { Rugged::Repository.new(object_pool_path) } let(:object_pool_rugged) { Rugged::Repository.new(object_pool_path) }
before do before do
object_pool.create object_pool.create # rubocop:disable Rails/SaveBang
end end
it 'does not raise an error when disconnecting a non-linked repository' do it 'does not raise an error when disconnecting a non-linked repository' do
......
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