Module: Specinfra

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

Overview

Override existing specinfra configuration to avoid conflicts with beaker's shell, stdout, stderr defines

Defined Under Namespace

Modules: Backend, Configuration Classes: CommandFactory, Runner

Instance Method Summary collapse

Instance Method Details

#cur_exampleObject

Accessor for current example


11
12
13
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 11

def cur_example
  Specinfra.backend.example
end

#cygwin_backendObject

The cygwin backend


26
27
28
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 26

def cygwin_backend
  @cygwin_backend ||= Specinfra::Backend::BeakerCygwin.instance
end

#exec_backendObject

Backend for everything non-cygwin


31
32
33
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 31

def exec_backend
  @exec_backend ||= Specinfra::Backend::BeakerExec.instance
end

#get_working_nodeObject


15
16
17
18
19
20
21
22
23
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 15

def get_working_node
  example = cur_example
  if example and example.[:node]
    node = example.[:node]
  else
    node = default_node
  end
  node
end