spec/stream_spec.rb in net-ssh-stream-0.2.0 vs spec/stream_spec.rb in net-ssh-stream-0.2.1
- old
+ new
@@ -2,10 +2,12 @@
describe Net::SSH::Stream do
let(:username) { `whoami`.strip }
- def exec(command, stdout: STDOUT, stderr: STDERR)
+ def exec(command, options={})
+ stdout = options.fetch(:stdout, STDOUT)
+ stderr = options.fetch(:stderr, STDERR)
exit_status = nil
Net::SSH::Stream.start('localhost', username) do |stram|
exit_status = stram.exec command, stdout: stdout, stderr: stderr
end
exit_status
\ No newline at end of file