diff options
author | Helen <helen@puppetlabs.com> | 2016-04-15 13:29:23 +0100 |
---|---|---|
committer | Helen <helen@puppetlabs.com> | 2016-04-15 13:29:23 +0100 |
commit | d9f65387c99c99177f94075fc840e7c574e07417 (patch) | |
tree | e2b1bf7362973650efdcac0a3be68df7d9bae8f6 /spec/spec_helper.rb | |
parent | 29961218a74bfdae96371c42a3c336e714c79a93 (diff) | |
parent | 085035dccebbf27cf2bfd7f1d9101c746f5178a2 (diff) |
Merge pull request #595 from tphoney/4.12.0_release
master to 4.12.x
Diffstat (limited to 'spec/spec_helper.rb')
-rwxr-xr-x | spec/spec_helper.rb | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 416036b..22d5d68 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,49 +1,8 @@ -#! /usr/bin/env ruby -S rspec -dir = File.expand_path(File.dirname(__FILE__)) -$LOAD_PATH.unshift File.join(dir, 'lib') - -# So everyone else doesn't have to include this base constant. -module PuppetSpec - FIXTURE_DIR = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") unless defined?(FIXTURE_DIR) -end - -require 'puppet' -require 'rspec-puppet' +#This file is generated by ModuleSync, do not edit. require 'puppetlabs_spec_helper/module_spec_helper' -require 'monkey_patches/alias_should_to_must' -require 'mocha/api' -#require 'puppetlabs_spec_helper/module_spec_helper' -require 'puppetlabs_spec_helper_clone' - -# hack to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples -RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers) - -RSpec.configure do |config| - config.module_path = File.join(File.dirname(File.expand_path(__FILE__)), 'fixtures', 'modules') - config.manifest_dir = File.join(File.dirname(File.expand_path(__FILE__)), 'fixtures', 'manifests') - config.environmentpath = spec_path = File.expand_path(File.join(Dir.pwd, 'spec')) - - config.add_setting :puppet_future - #config.puppet_future = (ENV['FUTURE_PARSER'] == 'yes' or Puppet.version.to_f >= 4.0) - config.puppet_future = Puppet.version.to_f >= 4.0 - - config.before :each do - # Ensure that we don't accidentally cache facts and environment between - # test cases. This requires each example group to explicitly load the - # facts being exercised with something like - # Facter.collection.loader.load(:ipaddress) - Facter.clear - Facter.clear_messages - - RSpec::Mocks.setup - end - - config.after :each do - RSpec::Mocks.verify - RSpec::Mocks.teardown - end -end -# Helper class to test handling of arguments which are derived from string -class AlsoString < String +# put local configuration and setup into spec_helper_local +begin + require 'spec_helper_local' +rescue LoadError end |