summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_spec.rb
diff options
context:
space:
mode:
authorFrançois Bobot <francois.bobot@cea.fr>2013-09-05 15:10:51 +0200
committerFrançois Bobot <francois.bobot@cea.fr>2013-09-16 11:00:19 +0200
commitd64ddc87558bc36d41593772e8399df05b89d5bf (patch)
treed92d5dfeea9b5125e8214f8c5e5d09a2ae48bafb /spec/gitlab_shell_spec.rb
parent2c238b717e86069aca485fae7a733135970b56a2 (diff)
downloadgitlab-shell-d64ddc87558bc36d41593772e8399df05b89d5bf.tar.gz
Execute command directly without using shell
use Shellwords.shellwords for splitting origin_cmd instead of .split(' ')
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r--spec/gitlab_shell_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
index 44dca6d..3243dd3 100644
--- a/spec/gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_spec.rb
@@ -60,7 +60,7 @@ describe GitlabShell do
end
it "should execute the command" do
- subject.should_receive(:exec_cmd).with("git-upload-pack #{File.join(repository_path, '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
@@ -89,7 +89,7 @@ describe GitlabShell do
end
it "should execute the command" do
- subject.should_receive(:exec_cmd).with("git-receive-pack #{File.join(repository_path, 'gitlab-ci.git')}")
+ subject.should_receive(:exec_cmd).with("git-receive-pack", File.join(repository_path, 'gitlab-ci.git'))
end
it "should log the command execution" do