root / spec / spec_helper.rb @ 5dedf86c
Historique | Voir | Annoter | Télécharger (769 octets)
1 |
# frozen_string_literal: true
|
---|---|
2 |
|
3 |
# Managed by modulesync - DO NOT EDIT
|
4 |
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
5 |
|
6 |
# puppetlabs_spec_helper will set up coverage if the env variable is set.
|
7 |
# We want to do this if lib exists and it hasn't been explicitly set.
|
8 |
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__)) |
9 |
|
10 |
require 'voxpupuli/test/spec_helper'
|
11 |
|
12 |
RSpec.configure do |c| |
13 |
c.facterdb_string_keys = false
|
14 |
end
|
15 |
|
16 |
add_mocked_facts! |
17 |
|
18 |
if File.exist?(File.join(__dir__, 'default_module_facts.yml')) |
19 |
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) |
20 |
facts&.each do |name, value|
|
21 |
add_custom_fact name.to_sym, value |
22 |
end
|
23 |
end
|
24 |
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } |