Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ae1fdfec
Commit
ae1fdfec
authored
Sep 23, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses
Fixes Rails/SaveBang cop for spec files in spec/lib/gitlab/git/*
parent
b6407994
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
.rubocop_todo.yml
.rubocop_todo.yml
+0
-3
changelogs/unreleased/rails-save-bang-37.yml
changelogs/unreleased/rails-save-bang-37.yml
+5
-0
spec/lib/gitlab/git/object_pool_spec.rb
spec/lib/gitlab/git/object_pool_spec.rb
+2
-2
spec/lib/gitlab/git/remote_mirror_spec.rb
spec/lib/gitlab/git/remote_mirror_spec.rb
+2
-2
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
ae1fdfec
...
...
@@ -949,9 +949,6 @@ Rails/SaveBang:
-
'
spec/lib/gitlab/email/handler/create_note_handler_spec.rb'
-
'
spec/lib/gitlab/email/handler/unsubscribe_handler_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/gitaly_client/object_pool_service_spec.rb'
-
'
spec/lib/gitlab/gitaly_client/repository_service_spec.rb'
...
...
changelogs/unreleased/rails-save-bang-37.yml
0 → 100644
View file @
ae1fdfec
---
title
:
Fixes Rails/SaveBang cop for spec files in spec/lib/gitlab/git/*
merge_request
:
43013
author
:
Rajendra Kadam
type
:
other
spec/lib/gitlab/git/object_pool_spec.rb
View file @
ae1fdfec
...
...
@@ -19,7 +19,7 @@ RSpec.describe Gitlab::Git::ObjectPool do
describe
'#create'
do
before
do
subject
.
create
subject
.
create
# rubocop:disable Rails/SaveBang
end
context
"when the pool doesn't exist yet"
do
...
...
@@ -31,7 +31,7 @@ RSpec.describe Gitlab::Git::ObjectPool do
context
'when the pool already exists'
do
it
'raises an FailedPrecondition'
do
expect
do
subject
.
create
subject
.
create
# rubocop:disable Rails/SaveBang
end
.
to
raise_error
(
GRPC
::
FailedPrecondition
)
end
end
...
...
spec/lib/gitlab/git/remote_mirror_spec.rb
View file @
ae1fdfec
...
...
@@ -16,7 +16,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do
.
to
receive
(
:update_remote_mirror
)
.
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
it
'wraps gitaly errors'
do
...
...
@@ -24,7 +24,7 @@ RSpec.describe Gitlab::Git::RemoteMirror do
.
to
receive
(
:update_remote_mirror
)
.
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
spec/lib/gitlab/git/repository_spec.rb
View file @
ae1fdfec
...
...
@@ -2079,7 +2079,7 @@ RSpec.describe Gitlab::Git::Repository, :seed_helper do
let
(
:object_pool_rugged
)
{
Rugged
::
Repository
.
new
(
object_pool_path
)
}
before
do
object_pool
.
create
object_pool
.
create
# rubocop:disable Rails/SaveBang
end
it
'does not raise an error when disconnecting a non-linked repository'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment