Class: Tomo::Testing::Connection
- Inherits:
-
SSH::Connection
- Object
- SSH::Connection
- Tomo::Testing::Connection
- Defined in:
- lib/tomo/testing/connection.rb
Instance Attribute Summary
Attributes inherited from SSH::Connection
Instance Method Summary collapse
-
#initialize(host, options) ⇒ Connection
constructor
A new instance of Connection.
- #ssh_exec(script) ⇒ Object
- #ssh_subprocess(script, verbose: false) ⇒ Object
Methods inherited from SSH::Connection
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, ) super(host, , 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 |