Sha256: f24c5a3b145e4a712273c5908310d382b9e566cf6ced14c9899ccf19d9a42408

Contents?: true

Size: 1.63 KB

Versions: 14

Compression:

Stored size: 1.63 KB

Contents

# frozen_string_literal: true

require 'simplecov'
require_relative '../lib/puppet-debugger'
require 'yaml'
ENV['COVERAGE'] = 'true'

module SimpleCov::Configuration
  def clean_filters
    @filters = []
  end
end

SimpleCov.configure do
  clean_filters
  load_profile 'test_frameworks'
end

SimpleCov.start do
  add_filter '/.rvm/'
  add_filter 'vendor'
  add_filter 'bundler'
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rspec'
require 'puppet-debugger'
ENV['REPL_FACTERDB_FILTER'] = 'operatingsystem=Fedora and operatingsystemrelease=23 and architecture=x86_64 and facterversion=/^2\\.4/'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

def stdlib_path
  File.join(Puppet[:basemodulepath].split(':').first, 'stdlib')
end

def install_stdlib
  `bundle exec puppet module install puppetlabs/stdlib` unless File.exists?(stdlib_path)
end

#install_stdlib

def fixtures_dir
  File.join(File.dirname(__FILE__), 'fixtures')
end

def environments_dir
  File.join(fixtures_dir, 'environments')
end

def supports_native_functions?
  Gem::Version.new(Puppet.version) >= Gem::Version.new('4.3')
end

def supports_type_function?
  Gem::Version.new(Puppet.version) >= Gem::Version.new('4.0')
end

def supports_datatypes?
  Gem::Version.new(Puppet.version) >= Gem::Version.new('4.5')
end


RSpec.configure do |config|
  config.filter_run_excluding native_functions: !supports_native_functions?
  RSpec::Expectations.configuration.on_potential_false_positives = :nothing
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
puppet-debugger-0.19.0 spec/spec_helper.rb
puppet-debugger-0.18.0 spec/spec_helper.rb
puppet-debugger-0.17.0 spec/spec_helper.rb
puppet-debugger-0.16.0 spec/spec_helper.rb
puppet-debugger-0.15.2 spec/spec_helper.rb
puppet-debugger-0.15.1 spec/spec_helper.rb
puppet-debugger-0.15.0 spec/spec_helper.rb
puppet-debugger-0.14.0 spec/spec_helper.rb
puppet-debugger-0.13.0 spec/spec_helper.rb
puppet-debugger-0.12.3 spec/spec_helper.rb
puppet-debugger-0.12.2 spec/spec_helper.rb
puppet-debugger-0.12.1 spec/spec_helper.rb
puppet-debugger-0.12.0 spec/spec_helper.rb
puppet-debugger-0.11.0 spec/spec_helper.rb