Sha256: 1a218c785f42f1df4ececd42b270b5e805ddc5021636103e9d2857e811ccb054

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onceover-4.0.0 templates/spec_helper.rb.erb
onceover-3.22.0 templates/spec_helper.rb.erb