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.8.10.2 spec/flydata/util/shell_spec.rb
flydata-0.8.10.1 spec/flydata/util/shell_spec.rb
flydata-0.8.9.11 spec/flydata/util/shell_spec.rb
flydata-0.8.10 spec/flydata/util/shell_spec.rb
flydata-0.8.9 spec/flydata/util/shell_spec.rb
flydata-0.8.8 spec/flydata/util/shell_spec.rb
flydata-0.8.7 spec/flydata/util/shell_spec.rb
flydata-0.8.6 spec/flydata/util/shell_spec.rb
flydata-0.8.5 spec/flydata/util/shell_spec.rb
flydata-0.8.4 spec/flydata/util/shell_spec.rb
flydata-0.8.3 spec/flydata/util/shell_spec.rb
flydata-0.8.2 spec/flydata/util/shell_spec.rb
flydata-0.8.1 spec/flydata/util/shell_spec.rb
flydata-0.8.0 spec/flydata/util/shell_spec.rb
flydata-0.7.19 spec/flydata/util/shell_spec.rb
flydata-0.7.18 spec/flydata/util/shell_spec.rb
flydata-0.7.17 spec/flydata/util/shell_spec.rb
flydata-0.7.16 spec/flydata/util/shell_spec.rb
flydata-0.7.15 spec/flydata/util/shell_spec.rb
flydata-0.7.14 spec/flydata/util/shell_spec.rb