Class: Specinfra::Backend::BeakerDispatch

Inherits:
BeakerBase
  • Object
show all
Defined in:
lib/beaker-rspec/helpers/serverspec.rb

Instance Method Summary collapse

Methods inherited from BeakerBase

#example, #ssh_exec!

Instance Method Details

#add_pre_command(cmd) ⇒ Object



219
220
221
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 219

def add_pre_command(cmd)
  dispatch_method('add_pre_command', cmd)
end

#build_command(cmd) ⇒ Object



215
216
217
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 215

def build_command(cmd)
  dispatch_method('build_command', cmd)
end

#dispatch_method(meth, *args) ⇒ Object



203
204
205
206
207
208
209
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 203

def dispatch_method(meth, *args)
  if get_working_node['platform'] =~ /windows/
    cygwin_backend.send(meth, *args)
  else
    exec_backend.send(meth, *args)
  end
end

#run_command(cmd, opts = {}) ⇒ Object



211
212
213
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 211

def run_command(cmd, opts={})
  dispatch_method('run_command', cmd, opts)
end