Method: SSHake::Mock::Session#connect

Defined in:
lib/sshake/mock/session.rb

#connectObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/sshake/mock/session.rb', line 26

def connect
  case @options[:connection_error]
  when :timeout
    raise Net::SSH::ConnectionTimeout
  when :authentication_failed
    raise Net::SSH::AuthenticationFailed
  when :connection_refused
    raise Errno::ECONNREFUSED
  when :host_unreachable
    raise Errno::EHOSTUNREACH
  else
    @connected = true
  end
end