Module: Serverspec::Helper::Ssh

Defined in:
lib/serverspec/helper/ssh.rb

Instance Method Summary collapse

Instance Method Details

#backend(commands_object = nil) ⇒ Object


4
5
6
7
8
9
10
11
# File 'lib/serverspec/helper/ssh.rb', line 4

def backend(commands_object=nil)
  if ! respond_to?(:commands)
    commands_object = Serverspec::Commands::Base.new
  end
  instance = Serverspec::Backend::Ssh.instance
  instance.set_commands(commands_object || commands)
  instance
end