Sha256: 69aa20974f0a7db4c15b731141bd0518b6e456a2e8ebda588786fd99116de4f3
Contents?: true
Size: 622 Bytes
Versions: 73
Compression:
Stored size: 622 Bytes
Contents
require 'spec_helper' module Flydata module Util describe Shell do describe '.run_cmd' do context 'when command returns 0' do it 'return status 0' do o, e, s = described_class.run_cmd('pwd') expect(s.to_i).to eq(0) expect(o).to match(/flydata/) expect(e).to be_empty end end context 'when command is invalid' do it 'return status 0' do expect { described_class.run_cmd('pwdssssss') }.to raise_error(Errno::ENOENT) end end end end end end
Version data entries
73 entries across 73 versions & 1 rubygems