diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
commit | a8e93b7f51d968c1380ed210499869b62b07fd15 (patch) | |
tree | c864e80dfd9cf4f83fcede678acc986e3a125bf5 /spec/lib/gitlab/popen_spec.rb | |
parent | 0625b15a481b3a3edd88110b3c18031ad9068d2f (diff) |
Version 7.10.0.rc5v7.10.0.rc5
Diffstat (limited to 'spec/lib/gitlab/popen_spec.rb')
-rw-r--r-- | spec/lib/gitlab/popen_spec.rb | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/lib/gitlab/popen_spec.rb b/spec/lib/gitlab/popen_spec.rb deleted file mode 100644 index cd9d0456b25..00000000000 --- a/spec/lib/gitlab/popen_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'spec_helper' - -describe 'Gitlab::Popen', no_db: true do - let (:path) { Rails.root.join('tmp').to_s } - - before do - @klass = Class.new(Object) - @klass.send(:include, Gitlab::Popen) - end - - context 'zero status' do - before do - @output, @status = @klass.new.popen(%W(ls), path) - end - - it { expect(@status).to be_zero } - it { expect(@output).to include('cache') } - end - - context 'non-zero status' do - before do - @output, @status = @klass.new.popen(%W(cat NOTHING), path) - end - - it { expect(@status).to eq(1) } - it { expect(@output).to include('No such file or directory') } - end - - context 'unsafe string command' do - it 'raises an error when it gets called with a string argument' do - expect { @klass.new.popen('ls', path) }.to raise_error - end - end - - context 'without a directory argument' do - before do - @output, @status = @klass.new.popen(%W(ls)) - end - - it { expect(@status).to be_zero } - it { expect(@output).to include('spec') } - end - -end - |