module BeakerRSpec::BeakerShim
BeakerShim
Module
This module provides the connection between rspec and the Beaker DSL. Additional wrappers are provided around commonly executed sets of Beaker commands.
Public Instance Methods
Source
# File lib/beaker-rspec/beaker_shim.rb, line 86 def cleanup @network_manager.cleanup end
Cleanup the testing framework, shut down test boxen and tidy up
Source
Source
# File lib/beaker-rspec/beaker_shim.rb, line 81 def default_node RSpec.configuration.default_node ||= find_only_one :default end
Accessor for default node @return [Beaker::Host]
Source
# File lib/beaker-rspec/beaker_shim.rb, line 70 def hosts RSpec.configuration.hosts end
Accessor for hosts object @return [Array<Beaker::Host>]
Source
# File lib/beaker-rspec/beaker_shim.rb, line 75 def hosts=(v) RSpec.configuration.hosts = v end
Setter for hosts object
Source
# File lib/beaker-rspec/beaker_shim.rb, line 16 def logger RSpec.configuration.logger end
Accessor for logger @return Beaker::Logger object
Source
# File lib/beaker-rspec/beaker_shim.rb, line 22 def metadata RSpec.configuration.metadata end
Accessor for metadata @return Hash metadata
Source
# File lib/beaker-rspec/beaker_shim.rb, line 28 def options RSpec.configuration.options end
Accessor for options hash @return Hash options
Source
# File lib/beaker-rspec/beaker_shim.rb, line 35 def provision @network_manager = Beaker::NetworkManager.new(options, @logger) RSpec.configuration.hosts = @network_manager.provision @network_manager.proxy_package_manager end
Provision the hosts to run tests on. Assumes setup
has already been called.
Source
# File lib/beaker-rspec/beaker_shim.rb, line 58 def setup(args = []) options_parser = Beaker::Options::Parser.new options = options_parser.parse_args(args) options[:debug] = true RSpec.configuration.logger = Beaker::Logger.new(options) options[:logger] = logger RSpec.configuration.hosts = [] RSpec.configuration.options = options end
Setup the testing environment @param [Array<String>] args The argument array of options for configuring Beaker See ‘beaker –help’ for full list of supported command line options