view modules/apache/spec/spec_helper.rb @ 81:c858ca1e01d0 puppet-3.6

Move to CentOS7-based dovecot (with a tweak for "in=…") because it seems to match output better
author IBBoard <dev@ibboard.co.uk>
date Sun, 01 Nov 2015 21:18:07 +0000
parents 37675581a273
children 675c1cc61eaf
line wrap: on
line source

require 'puppetlabs_spec_helper/module_spec_helper'

RSpec.configure do |c|
  c.treat_symbols_as_metadata_keys_with_true_values = true

  c.before :each do
    # Ensure that we don't accidentally cache facts and environment
    # between test cases.
    Facter::Util::Loader.any_instance.stubs(:load_all)
    Facter.clear
    Facter.clear_messages

    # Store any environment variables away to be restored later
    @old_env = {}
    ENV.each_key {|k| @old_env[k] = ENV[k]}

    if ENV['STRICT_VARIABLES'] == 'yes'
      Puppet.settings[:strict_variables]=true
    end
  end
end

shared_examples :compile, :compile => true do
  it { should compile.with_all_deps }
end