Class: Tomo::Testing::Connection

Inherits:
SSH::Connection show all
Defined in:
lib/tomo/testing/connection.rb

Instance Attribute Summary

Attributes inherited from SSH::Connection

#host

Instance Method Summary collapse

Methods inherited from SSH::Connection

#close, dry_run

Constructor Details

#initialize(host, options) ⇒ Connection

Returns a new instance of Connection.



6
7
8
# File 'lib/tomo/testing/connection.rb', line 6

def initialize(host, options)
  super(host, options, exec_proc: proc { raise MockedExecError }, child_proc: method(:mock_child_process))
end

Instance Method Details

#ssh_exec(script) ⇒ Object



10
11
12
13
# File 'lib/tomo/testing/connection.rb', line 10

def ssh_exec(script)
  host.scripts << script
  super
end

#ssh_subprocess(script, verbose: false) ⇒ Object



15
16
17
18
# File 'lib/tomo/testing/connection.rb', line 15

def ssh_subprocess(script, verbose: false)
  host.scripts << script
  super
end