Module: SpecInfra::Helper::BeakerBackend

Defined in:
lib/beaker-rspec/helpers/serverspec.rb

Overview

BeakerBackend Module

Instance Method Summary collapse

Instance Method Details

#backend(commands_object = nil) ⇒ SpecInfra::Backend::BeakerExec

Returns an instance of SpecInfra::Backend::BeakerExec

Parameters:

  • commands_object (Object) (defaults to: nil)

    The command object

Returns:



65
66
67
68
69
70
71
72
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 65

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