Forward standard error stream from remote execution
This commit is contained in:
@@ -29,6 +29,12 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
|
||||
describe '#error_output' do
|
||||
it 'returns env error output' do
|
||||
expect(action.error_output).to be env.error_output
|
||||
end
|
||||
end
|
||||
|
||||
describe '#remote' do
|
||||
it 'returns env remote' do
|
||||
expect(action.remote).to be env.remote
|
||||
|
@@ -9,6 +9,10 @@ module TestEnvHelpers
|
||||
env.output.string
|
||||
end
|
||||
|
||||
def error_output
|
||||
env.error_output.string
|
||||
end
|
||||
|
||||
def remote_fs
|
||||
env.remote.fs
|
||||
end
|
||||
@@ -17,14 +21,18 @@ module TestEnvHelpers
|
||||
opts = { expected_from: caller.first }
|
||||
RSpec::Mocks
|
||||
.expect_message(env.remote, :execute, opts)
|
||||
.with(command, env.output)
|
||||
.with(command, env.output, env.error_output)
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def build_env
|
||||
Producer::Core::Env.new(output: StringIO.new, remote: build_remote)
|
||||
Producer::Core::Env.new(
|
||||
output: StringIO.new,
|
||||
error_output: StringIO.new,
|
||||
remote: build_remote
|
||||
)
|
||||
end
|
||||
|
||||
def build_remote
|
||||
|
Reference in New Issue
Block a user