Forward standard error stream from remote execution

This commit is contained in:
Thibault Jouan
2014-07-21 12:45:57 +00:00
parent a033e19583
commit db91eb06cd
14 changed files with 93 additions and 17 deletions

View File

@@ -10,6 +10,10 @@ module Producer::Core
expect(env.input).to be $stdin
end
it 'assigns $stderr as the default error output' do
expect(env.error_output).to be $stderr
end
it 'assigns no default target' do
expect(env.target).not_to be
end
@@ -51,6 +55,15 @@ module Producer::Core
end
end
context 'when error output is given as argument' do
let(:error_output) { StringIO.new }
subject(:env) { described_class.new(error_output: error_output) }
it 'assigns the given error output' do
expect(env.error_output).to be error_output
end
end
context 'when remote is given as argument' do
let(:remote) { double 'remote' }
subject(:env) { described_class.new(remote: remote) }