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
7d4780ec
Commit
7d4780ec
authored
Mar 15, 2013
by
Christian Höltje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Randomize config.repos_path in tests
parent
bc770be5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
spec/gitlab_shell_spec.rb
spec/gitlab_shell_spec.rb
+5
-3
No files found.
spec/gitlab_shell_spec.rb
View file @
7d4780ec
...
...
@@ -16,12 +16,14 @@ describe GitlabShell do
end
end
let
(
:key_id
)
{
"key-
#{
rand
(
100
)
+
100
}
"
}
let
(
:repository_path
)
{
"/home/git
#{
rand
(
100
)
}
/repos"
}
before
{
GitlabConfig
.
any_instance
.
stub
(
:repos_path
).
and_return
(
repository_path
)
}
describe
:initialize
do
before
{
ssh_cmd
'git-receive-pack'
}
its
(
:key_id
)
{
should
==
key_id
}
its
(
:repos_path
)
{
should
==
"/home/git/repositories"
}
its
(
:repos_path
)
{
should
==
repository_path
}
end
describe
:parse_cmd
do
...
...
@@ -56,7 +58,7 @@ describe GitlabShell do
end
it
"should execute the command"
do
subject
.
should_receive
(
:exec_cmd
).
with
(
"git-upload-pack
/home/git/repositories/gitlab-ci.git
"
)
subject
.
should_receive
(
:exec_cmd
).
with
(
"git-upload-pack
#{
File
.
join
(
repository_path
,
'gitlab-ci.git'
)
}
"
)
end
it
"should set the GL_ID environment variable"
do
...
...
@@ -73,7 +75,7 @@ describe GitlabShell do
end
it
"should execute the command"
do
subject
.
should_receive
(
:exec_cmd
).
with
(
"git-receive-pack
/home/git/repositories/gitlab-ci.git
"
)
subject
.
should_receive
(
:exec_cmd
).
with
(
"git-receive-pack
#{
File
.
join
(
repository_path
,
'gitlab-ci.git'
)
}
"
)
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