summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-03-18 16:16:00 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-03-18 16:16:00 -0700
commit904f1a003e790ba2afaf3452ecda9805e87d80d0 (patch)
tree93407d68868c37af5d597d33134ba5a16e919a21 /spec/spec_helper.rb
parentdb00ce660520abfdc110d1ed0dd10bfbc708e256 (diff)
parentfec943f441f0c6ab8d6b685091d3418ec0e265b4 (diff)
downloadpuppet-stdlib-904f1a003e790ba2afaf3452ecda9805e87d80d0.tar.gz
puppet-stdlib-904f1a003e790ba2afaf3452ecda9805e87d80d0.tar.bz2
Merge branch '3.2.x' into 3.x
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb30
1 files changed, 20 insertions, 10 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 931d35c..cf1981b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,21 +1,31 @@
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, 'lib')
-# Don't want puppet getting the command line arguments for rake or autotest
-ARGV.clear
+# 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 'facter'
-require 'mocha'
-gem 'rspec', '>=2.0.0'
-require 'rspec/expectations'
-
+require 'rspec-puppet'
+require 'simplecov'
require 'puppetlabs_spec_helper/module_spec_helper'
+require 'puppet_spec/verbose'
+require 'puppet_spec/files'
+require 'puppet_spec/settings'
+require 'puppet_spec/fixtures'
+require 'puppet_spec/matchers'
+require 'puppet_spec/database'
+require 'monkey_patches/alias_should_to_must'
+require 'mocha/setup'
+
+
+SimpleCov.start do
+ add_filter "/spec/"
+end
+
RSpec.configure do |config|
- # FIXME REVISIT - We may want to delegate to Facter like we do in
- # Puppet::PuppetSpecInitializer.initialize_via_testhelper(config) because
- # this behavior is a duplication of the spec_helper in Facter.
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