diff options
author | François Bobot <francois.bobot@cea.fr> | 2013-09-05 15:10:51 +0200 |
---|---|---|
committer | François Bobot <francois.bobot@cea.fr> | 2013-09-16 11:00:19 +0200 |
commit | d64ddc87558bc36d41593772e8399df05b89d5bf (patch) | |
tree | d92d5dfeea9b5125e8214f8c5e5d09a2ae48bafb /spec/gitlab_shell_spec.rb | |
parent | 2c238b717e86069aca485fae7a733135970b56a2 (diff) | |
download | gitlab-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.rb | 4 |
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 |