-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathspec_helper.rb.erb
36 lines (31 loc) · 1.29 KB
/
spec_helper.rb.erb
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
35
36
RSpec.configure do |c|
c.mock_with :rspec
end
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec_junit_formatter'
require 'onceover/rspec/formatters'
RSpec.configure do |c|
# Create onceover settings to be accessed by formatters
c.add_setting :onceover_tempdir
c.add_setting :onceover_root
c.add_setting :onceover_environmentpath
c.onceover_tempdir = <%= repo.tempdir.inspect %>
c.onceover_root = <%= repo.root.inspect %>
c.onceover_environmentpath = <%= repo.environmentpath.inspect %>
# Also add JUnit output in case people want to use that
c.add_formatter('RSpecJUnitFormatter','<%= repo.tempdir %>/spec.xml')
<% @formatters.each do |fm| -%>
c.formatter = '<%= fm %>'
<% end -%>
c.environmentpath = '<%= environmentpath %>'
c.module_path = '<%= modulepath %>'
<% if repo.hiera_config_file_relative_path %>
c.hiera_config = '<%= environmentpath %>/production/<%= repo.hiera_config_file_relative_path %>'
<% end -%>
c.manifest = '<%= repo.temp_manifest %>'
ENV['STRICT_VARIABLES'] = '<%= self.strict_variables %>'
<% if ENV['SHOW_PUPPET_OUTPUT'] and ENV['SHOW_PUPPET_OUTPUT'].downcase == 'true' %>
Puppet::Util::Log.level = :debug
Puppet::Util::Log.newdestination(:console)
<% end -%>
end