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

Version Path
flydata-0.7.13 spec/flydata/util/shell_spec.rb
flydata-0.7.12 spec/flydata/util/shell_spec.rb
flydata-0.7.11 spec/flydata/util/shell_spec.rb
flydata-0.7.10 spec/flydata/util/shell_spec.rb
flydata-0.7.9 spec/flydata/util/shell_spec.rb
flydata-0.7.8 spec/flydata/util/shell_spec.rb
flydata-0.7.7 spec/flydata/util/shell_spec.rb
flydata-0.7.6 spec/flydata/util/shell_spec.rb
flydata-0.7.5 spec/flydata/util/shell_spec.rb
flydata-0.7.4 spec/flydata/util/shell_spec.rb
flydata-0.7.2.1 spec/flydata/util/shell_spec.rb
flydata-0.7.2 spec/flydata/util/shell_spec.rb
flydata-0.7.1 spec/flydata/util/shell_spec.rb
flydata-0.7.0 spec/flydata/util/shell_spec.rb
flydata-0.6.14 spec/flydata/util/shell_spec.rb
flydata-0.6.13 spec/flydata/util/shell_spec.rb
flydata-0.6.12 spec/flydata/util/shell_spec.rb
flydata-0.6.11 spec/flydata/util/shell_spec.rb
flydata-0.6.10 spec/flydata/util/shell_spec.rb
flydata-0.6.9 spec/flydata/util/shell_spec.rb