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
92cbc1e4
Commit
92cbc1e4
authored
Nov 30, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the `RSpec/ExpectActual` cop and correct offenses
parent
cb8d031e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
59 deletions
+53
-59
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-4
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+11
-22
spec/lib/gitlab/regex_spec.rb
spec/lib/gitlab/regex_spec.rb
+38
-33
No files found.
.rubocop.yml
View file @
92cbc1e4
...
@@ -801,6 +801,10 @@ RSpec/ExampleWording:
...
@@ -801,6 +801,10 @@ RSpec/ExampleWording:
not
:
does not
not
:
does not
IgnoredWords
:
[]
IgnoredWords
:
[]
# Checks for `expect(...)` calls containing literal values.
RSpec/ExpectActual
:
Enabled
:
true
# Checks the file and folder naming of the spec file.
# Checks the file and folder naming of the spec file.
RSpec/FilePath
:
RSpec/FilePath
:
Enabled
:
false
Enabled
:
false
...
...
.rubocop_todo.yml
View file @
92cbc1e4
...
@@ -85,10 +85,6 @@ Performance/RedundantMerge:
...
@@ -85,10 +85,6 @@ Performance/RedundantMerge:
RSpec/EmptyExampleGroup
:
RSpec/EmptyExampleGroup
:
Enabled
:
false
Enabled
:
false
# Offense count: 24
RSpec/ExpectActual
:
Enabled
:
false
# Offense count: 58
# Offense count: 58
# Configuration parameters: EnforcedStyle, SupportedStyles.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: implicit, each, example
# SupportedStyles: implicit, each, example
...
...
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
92cbc1e4
...
@@ -113,13 +113,11 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -113,13 +113,11 @@ describe 'Filter issues', js: true, feature: true do
end
end
it
'filters issues by invalid author'
do
it
'filters issues by invalid author'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
it
'filters issues by multiple authors'
do
it
'filters issues by multiple authors'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
...
@@ -158,8 +156,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -158,8 +156,7 @@ describe 'Filter issues', js: true, feature: true do
end
end
it
'sorting'
do
it
'sorting'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
...
@@ -182,13 +179,11 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -182,13 +179,11 @@ describe 'Filter issues', js: true, feature: true do
end
end
it
'filters issues by invalid assignee'
do
it
'filters issues by invalid assignee'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
it
'filters issues by multiple assignees'
do
it
'filters issues by multiple assignees'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
...
@@ -228,8 +223,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -228,8 +223,7 @@ describe 'Filter issues', js: true, feature: true do
context
'sorting'
do
context
'sorting'
do
it
'sorts'
do
it
'sorts'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
end
end
...
@@ -253,8 +247,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -253,8 +247,7 @@ describe 'Filter issues', js: true, feature: true do
end
end
it
'filters issues by invalid label'
do
it
'filters issues by invalid label'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
it
'filters issues by multiple labels'
do
it
'filters issues by multiple labels'
do
...
@@ -429,8 +422,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -429,8 +422,7 @@ describe 'Filter issues', js: true, feature: true do
context
'sorting'
do
context
'sorting'
do
it
'sorts'
do
it
'sorts'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
end
end
...
@@ -456,13 +448,11 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -456,13 +448,11 @@ describe 'Filter issues', js: true, feature: true do
end
end
it
'filters issues by invalid milestones'
do
it
'filters issues by invalid milestones'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
it
'filters issues by multiple milestones'
do
it
'filters issues by multiple milestones'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
it
'filters issues by milestone containing special characters'
do
it
'filters issues by milestone containing special characters'
do
...
@@ -523,8 +513,7 @@ describe 'Filter issues', js: true, feature: true do
...
@@ -523,8 +513,7 @@ describe 'Filter issues', js: true, feature: true do
context
'sorting'
do
context
'sorting'
do
it
'sorts'
do
it
'sorts'
do
pending
(
'to be tested, issue #26546'
)
skip
(
'to be tested, issue #26546'
)
expect
(
true
).
to
be
(
false
)
end
end
end
end
end
end
...
...
spec/lib/gitlab/regex_spec.rb
View file @
92cbc1e4
...
@@ -2,47 +2,52 @@
...
@@ -2,47 +2,52 @@
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Regex
,
lib:
true
do
describe
Gitlab
::
Regex
,
lib:
true
do
describe
'project path regex'
do
describe
'.project_path_regex'
do
it
{
expect
(
'gitlab-ce'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
subject
{
described_class
.
project_path_regex
}
it
{
expect
(
'gitlab_git'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'_underscore.js'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'100px.com'
).
to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'?gitlab'
).
not_to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'git lab'
).
not_to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
it
{
expect
(
'gitlab.git'
).
not_to
match
(
Gitlab
::
Regex
.
project_path_regex
)
}
end
describe
'project name regex'
do
it
{
is_expected
.
to
match
(
'gitlab-ce'
)
}
it
{
expect
(
'gitlab-ce'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
to
match
(
'gitlab_git'
)
}
it
{
expect
(
'GitLab CE'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
to
match
(
'_underscore.js'
)
}
it
{
expect
(
'100 lines'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
to
match
(
'100px.com'
)
}
it
{
expect
(
'gitlab.git'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
not_to
match
(
'?gitlab'
)
}
it
{
expect
(
'Český název'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
not_to
match
(
'git lab'
)
}
it
{
expect
(
'Dash – is this'
).
to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
it
{
is_expected
.
not_to
match
(
'gitlab.git'
)
}
it
{
expect
(
'?gitlab'
).
not_to
match
(
Gitlab
::
Regex
.
project_name_regex
)
}
end
end
describe
'file name regex'
do
describe
'.project_name_regex'
do
it
{
expect
(
'foo@bar'
).
to
match
(
Gitlab
::
Regex
.
file_name_regex
)
}
subject
{
described_class
.
project_name_regex
}
it
{
is_expected
.
to
match
(
'gitlab-ce'
)
}
it
{
is_expected
.
to
match
(
'GitLab CE'
)
}
it
{
is_expected
.
to
match
(
'100 lines'
)
}
it
{
is_expected
.
to
match
(
'gitlab.git'
)
}
it
{
is_expected
.
to
match
(
'Český název'
)
}
it
{
is_expected
.
to
match
(
'Dash – is this'
)
}
it
{
is_expected
.
not_to
match
(
'?gitlab'
)
}
end
end
describe
'file path regex'
do
describe
'.file_name_regex'
do
it
{
expect
(
'foo@/bar'
).
to
match
(
Gitlab
::
Regex
.
file_path_regex
)
}
subject
{
described_class
.
file_name_regex
}
it
{
is_expected
.
to
match
(
'foo@bar'
)
}
end
end
describe
'environment slug regex'
do
describe
'.file_path_regex'
do
def
be_matched
subject
{
described_class
.
file_path_regex
}
match
(
Gitlab
::
Regex
.
environment_slug_regex
)
end
it
{
is_expected
.
to
match
(
'foo@/bar'
)
}
end
it
{
expect
(
'foo'
).
to
be_matched
}
describe
'.environment_slug_regex'
do
it
{
expect
(
'foo-1'
).
to
be_matched
}
subject
{
described_class
.
environment_slug_regex
}
it
{
expect
(
'FOO'
).
not_to
be_matched
}
it
{
is_expected
.
to
match
(
'foo'
)
}
it
{
expect
(
'foo/1'
).
not_to
be_matched
}
it
{
is_expected
.
to
match
(
'foo-1'
)
}
it
{
expect
(
'foo.1'
).
not_to
be_matched
}
it
{
is_expected
.
not_to
match
(
'FOO'
)
}
it
{
expect
(
'foo*1'
).
not_to
be_matched
}
it
{
is_expected
.
not_to
match
(
'foo/1'
)
}
it
{
expect
(
'9foo'
).
not_to
be_matched
}
it
{
is_expected
.
not_to
match
(
'foo.1'
)
}
it
{
expect
(
'foo-'
).
not_to
be_matched
}
it
{
is_expected
.
not_to
match
(
'foo*1'
)
}
it
{
is_expected
.
not_to
match
(
'9foo'
)
}
it
{
is_expected
.
not_to
match
(
'foo-'
)
}
end
end
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