Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GitLab
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
projects.thm.de
GitLab
Commits
1b0c6ffd
Commit
1b0c6ffd
authored
Jun 29, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable RSpec/BeforeAfterAll and enable RSpec/ImplicitExpect cops
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d52034b2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
.rubocop.yml
.rubocop.yml
+10
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-10
project_group_link_spec.rb
spec/models/project_group_link_spec.rb
+6
-6
external_wiki_service_spec.rb
spec/models/project_services/external_wiki_service_spec.rb
+2
-2
project_spec.rb
spec/models/project_spec.rb
+2
-2
No files found.
.rubocop.yml
View file @
1b0c6ffd
...
...
@@ -965,6 +965,10 @@ RSpec/AnyInstance:
RSpec/BeEql
:
Enabled
:
true
# We don't enforce this as we use this technique in a few places.
RSpec/BeforeAfterAll
:
Enabled
:
false
# Check that the first argument to the top level describe is the tested class or
# module.
RSpec/DescribeClass
:
...
...
@@ -1024,6 +1028,12 @@ RSpec/FilePath:
RSpec/Focus
:
Enabled
:
true
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect
:
Enabled
:
true
EnforcedStyle
:
is_expected
# Checks for the usage of instance variables.
RSpec/InstanceVariable
:
Enabled
:
false
...
...
.rubocop_todo.yml
View file @
1b0c6ffd
...
...
@@ -6,10 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 54
RSpec/BeforeAfterAll
:
Enabled
:
false
# Offense count: 233
RSpec/EmptyLineAfterFinalLet
:
Enabled
:
false
...
...
@@ -24,12 +20,6 @@ RSpec/EmptyLineAfterSubject:
RSpec/HookArgument
:
Enabled
:
false
# Offense count: 12
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect
:
Enabled
:
false
# Offense count: 11
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: it_behaves_like, it_should_behave_like
...
...
spec/models/project_group_link_spec.rb
View file @
1b0c6ffd
...
...
@@ -2,8 +2,8 @@ require 'spec_helper'
describe
ProjectGroupLink
do
describe
"Associations"
do
it
{
should
belong_to
(
:group
)
}
it
{
should
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:group
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
describe
"Validation"
do
...
...
@@ -12,10 +12,10 @@ describe ProjectGroupLink do
let
(
:project
)
{
create
(
:project
,
group:
group
)
}
let!
(
:project_group_link
)
{
create
(
:project_group_link
,
project:
project
)
}
it
{
should
validate_presence_of
(
:project_id
)
}
it
{
should
validate_uniqueness_of
(
:group_id
).
scoped_to
(
:project_id
).
with_message
(
/already shared/
)
}
it
{
should
validate_presence_of
(
:group
)
}
it
{
should
validate_presence_of
(
:group_access
)
}
it
{
is_expected
.
to
validate_presence_of
(
:project_id
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:group_id
).
scoped_to
(
:project_id
).
with_message
(
/already shared/
)
}
it
{
is_expected
.
to
validate_presence_of
(
:group
)
}
it
{
is_expected
.
to
validate_presence_of
(
:group_access
)
}
it
"doesn't allow a project to be shared with the group it is in"
do
project_group_link
.
group
=
group
...
...
spec/models/project_services/external_wiki_service_spec.rb
View file @
1b0c6ffd
...
...
@@ -3,8 +3,8 @@ require 'spec_helper'
describe
ExternalWikiService
,
models:
true
do
include
ExternalWikiHelper
describe
"Associations"
do
it
{
should
belong_to
:project
}
it
{
should
have_one
:service_hook
}
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
end
describe
'Validations'
do
...
...
spec/models/project_spec.rb
View file @
1b0c6ffd
...
...
@@ -823,13 +823,13 @@ describe Project, models: true do
let
(
:avatar_path
)
{
"/
#{
project
.
full_path
}
/avatar"
}
it
{
should
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
it
{
is_expected
.
to
eq
"http://
#{
Gitlab
.
config
.
gitlab
.
host
}#{
avatar_path
}
"
}
end
context
'when git repo is empty'
do
let
(
:project
)
{
create
(
:empty_project
)
}
it
{
should
eq
nil
}
it
{
is_expected
.
to
eq
nil
}
end
end
...
...
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