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
33a92272
Commit
33a92272
authored
Sep 02, 2020
by
Rajendra Kadam
Committed by
Rémy Coutable
Sep 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RSpec/ItBehavesLike cop
parent
887642fd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
18 deletions
+14
-18
.rubocop_todo.yml
.rubocop_todo.yml
+0
-9
changelogs/unreleased/it-behaves-cop.yml
changelogs/unreleased/it-behaves-cop.yml
+5
-0
spec/lib/gitlab/git/commit_spec.rb
spec/lib/gitlab/git/commit_spec.rb
+4
-4
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+5
-5
No files found.
.rubocop_todo.yml
View file @
33a92272
...
...
@@ -252,15 +252,6 @@ RSpec/ExpectChange:
RSpec/ExpectInHook
:
Enabled
:
false
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: it_behaves_like, it_should_behave_like
RSpec/ItBehavesLike
:
Exclude
:
-
'
spec/lib/gitlab/git/commit_spec.rb'
-
'
spec/services/notification_service_spec.rb'
# Offense count: 68
# Cop supports --auto-correct.
RSpec/LetBeforeExamples
:
...
...
changelogs/unreleased/it-behaves-cop.yml
0 → 100644
View file @
33a92272
---
title
:
Fix RSpec/ItBehavesLike cop
merge_request
:
41111
author
:
Rajendra Kadam
type
:
fixed
spec/lib/gitlab/git/commit_spec.rb
View file @
33a92272
...
...
@@ -192,7 +192,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end
describe
'.find with Gitaly enabled'
do
it_
should_behave
_like
'.find'
it_
behaves
_like
'.find'
end
describe
'.find with Rugged enabled'
,
:enable_rugged
do
...
...
@@ -204,7 +204,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
described_class
.
find
(
repository
,
SeedRepo
::
Commit
::
ID
)
end
it_
should_behave
_like
'.find'
it_
behaves
_like
'.find'
end
describe
'.last_for_path'
do
...
...
@@ -474,7 +474,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end
describe
'.batch_by_oid with Gitaly enabled'
do
it_
should_behave
_like
'.batch_by_oid'
it_
behaves
_like
'.batch_by_oid'
context
'when oids is empty'
do
it
'makes no Gitaly request'
do
...
...
@@ -486,7 +486,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end
describe
'.batch_by_oid with Rugged enabled'
,
:enable_rugged
do
it_
should_behave
_like
'.batch_by_oid'
it_
behaves
_like
'.batch_by_oid'
it
'calls out to the Rugged implementation'
do
allow_next_instance_of
(
Rugged
)
do
|
instance
|
...
...
spec/services/notification_service_spec.rb
View file @
33a92272
...
...
@@ -151,9 +151,9 @@ RSpec.describe NotificationService, :mailer do
end
shared_examples_for
'participating notifications'
do
it_
should_behave
_like
'participating by note notification'
it_
should_behave
_like
'participating by author notification'
it_
should_behave
_like
'participating by assignee notification'
it_
behaves
_like
'participating by note notification'
it_
behaves
_like
'participating by author notification'
it_
behaves
_like
'participating by assignee notification'
end
describe
'#async'
do
...
...
@@ -1682,13 +1682,13 @@ RSpec.describe NotificationService, :mailer do
end
context
'participating'
do
it_
should_behave
_like
'participating by assignee notification'
do
it_
behaves
_like
'participating by assignee notification'
do
let
(
:participant
)
{
create
(
:user
,
username:
'user-participant'
)}
let
(
:issuable
)
{
merge_request
}
let
(
:notification_trigger
)
{
notification
.
new_merge_request
(
merge_request
,
@u_disabled
)
}
end
it_
should_behave
_like
'participating by note notification'
do
it_
behaves
_like
'participating by note notification'
do
let
(
:participant
)
{
create
(
:user
,
username:
'user-participant'
)}
let
(
:issuable
)
{
merge_request
}
let
(
:notification_trigger
)
{
notification
.
new_merge_request
(
merge_request
,
@u_disabled
)
}
...
...
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