summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_gitlab_shell_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-12-13 10:23:17 +0000
committerDouwe Maan <douwe@gitlab.com>2018-12-13 10:23:17 +0000
commitdf89099ed954a6673bb8388ef74480940d40a759 (patch)
treec3db905b0890895303b2f1ca91f3ac02664ce48a /spec/gitlab_shell_gitlab_shell_spec.rb
parent528960c801aed81a977e7ce58a9706b4ea32ab4a (diff)
parent46e81d93ff74a98cf4f02735d310ee4417be0217 (diff)
downloadgitlab-shell-df89099ed954a6673bb8388ef74480940d40a759.tar.gz
Merge branch 'sh-bump-ruby-version' into 'master'
Upgrade to Ruby 2.5.3 See merge request gitlab-org/gitlab-shell!257
Diffstat (limited to 'spec/gitlab_shell_gitlab_shell_spec.rb')
-rw-r--r--spec/gitlab_shell_gitlab_shell_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/gitlab_shell_gitlab_shell_spec.rb b/spec/gitlab_shell_gitlab_shell_spec.rb
index 9afeac8..e5342b7 100644
--- a/spec/gitlab_shell_gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_gitlab_shell_spec.rb
@@ -1,4 +1,5 @@
require_relative 'spec_helper'
+require 'open3'
describe 'bin/gitlab-shell' do
def original_root_path
@@ -131,12 +132,13 @@ describe 'bin/gitlab-shell' do
def run!(args)
cmd = [
+ 'SSH_CONNECTION=fake',
gitlab_shell_path,
args
- ].flatten.compact
+ ].flatten.join(' ')
- output = IO.popen({'SSH_CONNECTION' => 'fake'}, cmd, &:read)
+ stdout, _stderr, status = Open3.capture3(cmd)
- [output, $?]
+ [stdout, status]
end
end