Module: Serverspec::Helper::Cmd

Defined in:
lib/serverspec/helper/cmd.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/cmd.rb', line 4

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