2014-05-16 04:08:35 +00:00
|
|
|
require 'mocha'
|
|
|
|
require 'rspec'
|
2016-09-16 19:15:26 +00:00
|
|
|
require 'puppet/version'
|
2016-09-09 20:44:05 +00:00
|
|
|
require 'puppet-strings'
|
2016-09-14 19:20:26 +00:00
|
|
|
require 'puppet-strings/yard'
|
|
|
|
|
|
|
|
# Explicitly set up YARD once
|
|
|
|
PuppetStrings::Yard.setup!
|
2014-08-26 23:57:55 +00:00
|
|
|
|
2016-09-16 19:15:26 +00:00
|
|
|
# Enable testing of Puppet functions if running against 4.1+
|
|
|
|
TEST_PUPPET_FUNCTIONS = Gem::Dependency.new('', '>= 4.1.0').match?('', Puppet::PUPPETVERSION)
|
|
|
|
|
2014-08-19 17:44:40 +00:00
|
|
|
RSpec.configure do |config|
|
2016-09-14 19:20:26 +00:00
|
|
|
config.mock_with :mocha
|
|
|
|
|
|
|
|
config.before(:each) do
|
|
|
|
# Always clear the YARD registry before each example
|
|
|
|
YARD::Registry.clear
|
|
|
|
end
|
2014-05-16 04:08:35 +00:00
|
|
|
end
|
2014-08-26 23:57:55 +00:00
|
|
|
|