forked from voxpupuli/modulesync_config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec_helper.rb.erb
More file actions
34 lines (27 loc) · 958 Bytes
/
spec_helper.rb.erb
File metadata and controls
34 lines (27 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
<%- if @configs['mock_with'] -%>
RSpec.configure do |c|
c.mock_with <%= @configs['mock_with'] %>
end
<%- end -%>
# puppetlabs_spec_helper will set up coverage if the env variable is set.
# We want to do this if lib exists and it hasn't been explicitly set.
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))
require 'voxpupuli/test/spec_helper'
<%- if @configs['hiera_config'] -%>
RSpec.configure do |c|
c.hiera_config = <%= @configs['hiera_config'] %>
end
<%- end -%>
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
if facts
facts.each do |name, value|
add_custom_fact name.to_sym, value
end
end
end
<%- [@configs['spec_overrides']].flatten.compact.each do |line| -%>
<%= line %>
<%- end -%>