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
3c242dda
Commit
3c242dda
authored
Jun 22, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring changes from EE
parent
254e589d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
spec/support/matchers/match_ids.rb
spec/support/matchers/match_ids.rb
+7
-0
No files found.
spec/support/matchers/match_ids.rb
View file @
3c242dda
...
...
@@ -10,6 +10,13 @@ RSpec::Matchers.define :match_ids do |*expected|
'matches elements by ids'
end
failure_message
do
actual_ids
=
map_ids
(
actual
)
expected_ids
=
map_ids
(
expected
)
"expected IDs
#{
actual_ids
}
in:
\n\n
#{
actual
.
inspect
}
\n\n
to match IDs
#{
expected_ids
}
in:
\n\n
#{
expected
.
inspect
}
"
end
def
map_ids
(
elements
)
elements
=
elements
.
flatten
if
elements
.
respond_to?
(
:flatten
)
...
...
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