Sha256: 1084ae7b7ed1c7a51428f4cf363b34ac510f88ebf076b79ec87e6c5c89c8c9d8
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
require_relative '../../spec_helper.rb' module Larrow::Runner::Service describe Executor do subject{ Executor.new 'localhost', `whoami`.chomp, 22, nil } it 'normal command run'do outputs = '' subject.execute('echo aaa',verbose:true){|data| outputs << data} expect(outputs).to eq "aaa\n" end it 'command with base dir' do outputs = '' subject.execute('pwd', base_dir: '/opt',verbose:true) do |data| outputs << data end expect(outputs).to eq "/opt\n" end it 'fail command' do expect(->{subject.execute('false')}).to raise_error(ExecutionError) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
larrow-runner-0.0.3 | spec/unit_test/service/executor_spec.rb |