Sha256: d05592cdd1ecad8f9bc03ce7cf72b686b6e8a613c82e1e3e39772db26aa6e9c0

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

# This file provides a require-able entry point for putting at the top of your
# tests, or in a shared helper.

require 'rspec-system'
require 'yaml'
require 'pp'
require 'tempfile'

include RSpecSystem::Helpers

RSpec.configure do |c|
  include RSpecSystem::Log
  include RSpecSystem::InternalHelpers
  c.include RSpecSystem::Helpers
  c.include RSpecSystem::InternalHelpers
  c.extend RSpecSystem::Helpers

  # This provides a path to save vagrant files
  c.add_setting :system_tmp
  # Storage for ssh channels
  c.add_setting :ssh_channels, :default => {}
  c.add_setting :rspec_storage, :default => {}

  # Default the system_tmp dir to something random
  c.system_tmp = rspec_system_tmp

  c.before :suite do
    # Before Suite exceptions get captured it seems
    begin
      start_nodes
    rescue => ex
      output << ex.inspect + " in\n"
      output << ex.backtrace.join("\n  ") << "\n"
      exit(1)
    end
  end

  c.after :suite do
    # After Suite exceptions get captured it seems
    begin
      stop_nodes
    rescue => ex
      output << ex.inspect + " in\n"
      output << ex.backtrace.join("\n  ") << "\n"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-system-2.5.1 lib/rspec-system/spec_helper.rb
rspec-system-2.5.0 lib/rspec-system/spec_helper.rb
rspec-system-2.4.0 lib/rspec-system/spec_helper.rb
rspec-system-2.3.0 lib/rspec-system/spec_helper.rb