Sha256: fd8012c8fb3c4bbc63eaeef103c03eeac84c1cf796911a4105892035aa039a2e

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

# Yes it's strange that we have to call `RSpec.configure` more than once. The
# reason we are doing this is to silence the incredibly annoying warning:
#
# puppetlabs_spec_helper: defaults `mock_with` to `:mocha`
#
# In order to do this we have configure the
# mocking, THEN require puppetlabs_spec_helper.
#
# Yes, I know. Someone buy me a 🍺 for fixing this.
#
RSpec.configure do |c|
  c.mock_with :mocha
end

require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec_junit_formatter'

RSpec.configure do |c|
  # Also add JUnit output in case people want to use that
  c.add_formatter('RSpecJUnitFormatter','<%= repo.tempdir %>/spec.xml')

  c.parser                = 'future'
  c.formatter             = 'documentation'
  c.trusted_server_facts  = true
  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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onceover-3.10.2 templates/spec_helper.rb.erb
onceover-3.10.1 templates/spec_helper.rb.erb
onceover-3.10.0 templates/spec_helper.rb.erb