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
56f3375d
Commit
56f3375d
authored
May 19, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub class in tree spec
parent
d194f3dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
.rubocop.yml
.rubocop.yml
+0
-1
changelogs/unreleased/leaky-constant-fix-16.yml
changelogs/unreleased/leaky-constant-fix-16.yml
+5
-0
spec/models/tree_spec.rb
spec/models/tree_spec.rb
+12
-9
No files found.
.rubocop.yml
View file @
56f3375d
...
...
@@ -387,7 +387,6 @@ RSpec/LeakyConstantDeclaration:
-
'
spec/models/concerns/reactive_caching_spec.rb'
-
'
spec/models/concerns/triggerable_hooks_spec.rb'
-
'
spec/models/repository_spec.rb'
-
'
spec/models/tree_spec.rb'
-
'
spec/policies/merge_request_policy_spec.rb'
-
'
spec/requests/api/graphql/tasks/task_completion_status_spec.rb'
-
'
spec/requests/api/statistics_spec.rb'
...
...
changelogs/unreleased/leaky-constant-fix-16.yml
0 → 100644
View file @
56f3375d
---
title
:
Fix leaky constant issue in tree spec
merge_request
:
32045
author
:
Rajendra Kadam
type
:
fixed
spec/models/tree_spec.rb
View file @
56f3375d
...
...
@@ -9,15 +9,18 @@ describe Tree do
subject
{
described_class
.
new
(
repository
,
'54fcc214'
)
}
describe
'#readme'
do
class
FakeBlob
attr_reader
:name
def
initialize
(
name
)
@name
=
name
end
def
readme?
name
=~
/^readme/i
before
do
stub_const
(
'FakeBlob'
,
Class
.
new
)
FakeBlob
.
class_eval
do
attr_reader
:name
def
initialize
(
name
)
@name
=
name
end
def
readme?
name
=~
/^readme/i
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