fuel-library/deployment/puppet/postgresql/spec/spec_helper.rb
Matthew Mosesohn e97c8338c9 Rebase postgresql to puppetlabs-postgresql-4.0.0
Rebases to puppetlabs-postgresql commit id:
5d4a543a54df0c9c52a5c7c1f68e5ae51d862947

Older postgresql lacks capability to handle
bindir path changes in postgres 9.0 and newer.

Change-Id: If8265bcdd7144a44b97a9f2e7d72f8a4b263920a
Partial-Bug: #1386118
Related blueprint merge-openstack-puppet-modules
2014-10-27 14:26:40 +00:00

32 lines
755 B
Ruby

require 'puppetlabs_spec_helper/module_spec_helper'
RSpec.configure do |c|
c.mock_with :rspec do |mock|
mock.syntax = [:expect, :should]
end
c.include PuppetlabsSpec::Files
c.before :each do
# 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
c.after :each do
PuppetlabsSpec::Files.cleanup
end
end
# Convenience helper for returning parameters for a type from the
# catalogue.
def param(type, title, param)
param_value(catalogue, type, title, param)
end
# With rspec-puppet v2.0 this allows coverage checks.
#at_exit { RSpec::Puppet::Coverage.report! }