spec/stream_spec.rb in net-ssh-stream-0.1.0 vs spec/stream_spec.rb in net-ssh-stream-0.2.0
- old
+ new
@@ -28,6 +28,13 @@
refute_equal 0, exit_status
assert_equal "bash: invalid-command: command not found", stderr.read.strip
end
+ it 'Raise exception' do
+ Net::SSH::Stream.start 'localhost', username do |stram|
+ stram.exec! 'pwd', stdout: StringIO.new
+ Proc.new { stram.exec! 'invalid-command', stderr: StringIO.new }.must_raise RuntimeError
+ end
+ end
+
end
\ No newline at end of file