Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
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-shell
Commits
240579d9
Commit
240579d9
authored
Dec 20, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rspec deprecation warnings
parent
5969bd06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
spec/hooks_utils_spec.rb
spec/hooks_utils_spec.rb
+15
-9
No files found.
spec/hooks_utils_spec.rb
View file @
240579d9
...
...
@@ -3,20 +3,26 @@ require_relative '../lib/hooks_utils.rb'
describe
:get_push_options
do
context
"when GIT_PUSH_OPTION_COUNT is not set"
do
HooksUtils
.
get_push_options
.
should
==
[]
it
{
expect
(
HooksUtils
.
get_push_options
).
to
eq
([])
}
end
context
"when one option is given"
do
ENV
[
'GIT_PUSH_OPTION_COUNT'
]
=
'1'
ENV
[
'GIT_PUSH_OPTION_0'
]
=
'aaa'
HooksUtils
.
get_push_options
.
should
==
[
'aaa'
]
before
do
ENV
[
'GIT_PUSH_OPTION_COUNT'
]
=
'1'
ENV
[
'GIT_PUSH_OPTION_0'
]
=
'aaa'
end
it
{
expect
(
HooksUtils
.
get_push_options
).
to
eq
([
'aaa'
])
}
end
context
"when multiple options are given"
do
ENV
[
'GIT_PUSH_OPTION_COUNT'
]
=
'3'
ENV
[
'GIT_PUSH_OPTION_0'
]
=
'aaa'
ENV
[
'GIT_PUSH_OPTION_1'
]
=
'bbb'
ENV
[
'GIT_PUSH_OPTION_2'
]
=
'ccc'
HooksUtils
.
get_push_options
.
should
==
[
'aaa'
,
'bbb'
,
'ccc'
]
before
do
ENV
[
'GIT_PUSH_OPTION_COUNT'
]
=
'3'
ENV
[
'GIT_PUSH_OPTION_0'
]
=
'aaa'
ENV
[
'GIT_PUSH_OPTION_1'
]
=
'bbb'
ENV
[
'GIT_PUSH_OPTION_2'
]
=
'ccc'
end
it
{
expect
(
HooksUtils
.
get_push_options
).
to
eq
([
'aaa'
,
'bbb'
,
'ccc'
])
}
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