Révision 20eaf3c2
modulesync 5.1.0
spec/spec_helper.rb | ||
---|---|---|
1 |
# frozen_string_literal: true |
|
2 |
|
|
1 | 3 |
# Managed by modulesync - DO NOT EDIT |
2 | 4 |
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ |
3 | 5 |
|
... | ... | |
7 | 9 |
|
8 | 10 |
# puppetlabs_spec_helper will set up coverage if the env variable is set. |
9 | 11 |
# We want to do this if lib exists and it hasn't been explicitly set. |
10 |
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))
|
|
12 |
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
|
|
11 | 13 |
|
12 | 14 |
require 'voxpupuli/test/spec_helper' |
13 | 15 |
|
14 | 16 |
if File.exist?(File.join(__dir__, 'default_module_facts.yml')) |
15 | 17 |
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) |
16 |
if facts |
|
17 |
facts.each do |name, value| |
|
18 |
add_custom_fact name.to_sym, value |
|
19 |
end |
|
18 |
facts&.each do |name, value| |
|
19 |
add_custom_fact name.to_sym, value |
|
20 | 20 |
end |
21 | 21 |
end |
Formats disponibles : Unified diff