Sha256: b6700f5f74b3b9abb61c7019c475cbe557ad51b5e4bbb5c05bc12fac9ba25edb

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

require 'spec_helper'
require 'exogenesis/passengers/shell'

describe Shell do
  let(:config) { double }
  let(:commands) { ['echo "hello world"'] }

  before {
    allow(config).to receive(:commands).and_return(commands)
  }

  let(:executor) { executor_double }

  subject { Shell.new(config, executor) }

  describe :up do
    it 'should succeed if exit code is equal 0' do
      expect(executor).to receive(:execute)
        .with('Executing command `echo "hello world"`', 'echo "hello world"')
      subject.up
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
exogenesis-1.0.0 spec/unit/shell_spec.rb