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
ee684a09
Commit
ee684a09
authored
Aug 19, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless `.and_call_origin` from specs
parent
ed9dc123
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
spec/gitlab_net_spec.rb
spec/gitlab_net_spec.rb
+5
-17
No files found.
spec/gitlab_net_spec.rb
View file @
ee684a09
...
...
@@ -276,19 +276,7 @@ describe GitlabNet, vcr: true do
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
host:
'127.0.0.1'
,
port:
6379
,
db:
0
}).
and_call_original
gitlab_net
.
redis_client
end
end
context
"with host and port"
do
it
'uses the specified host and port'
do
allow
(
gitlab_net
).
to
receive
(
:config
).
and_return
(
config
)
allow
(
config
).
to
receive
(
:redis
).
and_return
(
{
'host'
=>
'localhost'
,
'port'
=>
1123
}
)
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
host:
'localhost'
,
port:
1123
,
db:
0
}).
and_call_original
db:
0
})
gitlab_net
.
redis_client
end
end
...
...
@@ -301,13 +289,13 @@ describe GitlabNet, vcr: true do
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
host:
'localhost'
,
port:
1123
,
db:
0
,
password:
'secret'
})
.
and_call_original
password:
'secret'
})
gitlab_net
.
redis_client
end
end
context
"with sentinels"
do
it
'use
r
s the specified sentinels'
do
it
'uses the specified sentinels'
do
allow
(
gitlab_net
).
to
receive
(
:config
).
and_return
(
config
)
allow
(
config
).
to
receive
(
:redis
).
and_return
({
'host'
=>
'localhost'
,
'port'
=>
1123
,
'sentinels'
=>
[{
'host'
=>
'127.0.0.1'
,
'port'
=>
26380
}]
})
...
...
@@ -315,7 +303,7 @@ describe GitlabNet, vcr: true do
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
host:
'localhost'
,
port:
1123
,
db:
0
,
sentinels:
[{
host:
'127.0.0.1'
,
port:
26380
}]
})
.
and_call_original
sentinels:
[{
host:
'127.0.0.1'
,
port:
26380
}]
})
gitlab_net
.
redis_client
end
end
...
...
@@ -328,7 +316,7 @@ describe GitlabNet, vcr: true do
allow
(
gitlab_net
).
to
receive
(
:config
).
and_return
(
config
)
allow
(
config
).
to
receive
(
:redis
).
and_return
(
{
'socket'
=>
socket
})
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
path:
socket
,
db:
0
})
.
and_call_original
expect_any_instance_of
(
Redis
).
to
receive
(
:initialize
).
with
({
path:
socket
,
db:
0
})
gitlab_net
.
redis_client
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