Sha256: 8bfd09079ce2fac651e4c41928c68504ce902bb0c34c2b78cca8f1e63e2e667b

Contents?: true

Size: 1.15 KB

Versions: 12

Compression:

Stored size: 1.15 KB

Contents

require 'rubygems' unless defined?(Gem)
require 'bundler'
begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

require 'rspec'
require 'chef'
require 'chef/knife'
require 'fog'

unless defined?(IRONFAN_DIR)
  IRONFAN_DIR = File.expand_path(File.dirname(__FILE__)+'/..')
  def IRONFAN_DIR(*paths) File.join(IRONFAN_DIR, *paths); end
  # load from vendored libraries, if present
  Dir[IRONFAN_DIR("vendor/*/lib")].each{|dir| p dir ;  $LOAD_PATH.unshift(File.expand_path(dir)) } ; $LOAD_PATH.uniq!
end

Fog.mock!
Fog::Mock.delay = 0

CHEF_CONFIG_FILE = File.expand_path(IRONFAN_DIR('spec/test_config.rb')) unless defined?(CHEF_CONFIG_FILE)
Chef::Config.from_file(CHEF_CONFIG_FILE)

# Requires custom matchers & macros, etc from files in ./spec_helper/
Dir[IRONFAN_DIR("spec/spec_helper/*.rb")].each {|f| require f}

def load_example_cluster(name)
  require(IRONFAN_DIR('clusters', "#{name}.rb"))
end
def get_example_cluster name
  load_example_cluster(name)
  Ironfan.cluster(name)
end

# Configure rspec
RSpec.configure do |config|
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ironfan-4.1.0 spec/spec_helper.rb
ironfan-4.0.9 spec/spec_helper.rb
ironfan-4.0.8 spec/spec_helper.rb
ironfan-4.0.5 spec/spec_helper.rb
ironfan-4.0.4 spec/spec_helper.rb
ironfan-4.0.3 spec/spec_helper.rb
ironfan-3.2.2 spec/spec_helper.rb
ironfan-4.0.2 spec/spec_helper.rb
ironfan-4.0.1 spec/spec_helper.rb
ironfan-4.0.0 spec/spec_helper.rb
ironfan-3.1.7 spec/spec_helper.rb
ironfan-3.1.6 spec/spec_helper.rb