summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-05-24 10:19:22 -0400
committerMicah <micah@leap.se>2016-05-24 10:19:22 -0400
commit823e83dfb47af1d023f5e4ca46078bbc4df72006 (patch)
tree30f236bd3940e97d7f324f9e15b56532253feb52 /spec/spec_helper.rb
Squashed 'puppet/modules/sshd/' content from commit 76f4f87
git-subtree-dir: puppet/modules/sshd git-subtree-split: 76f4f872f81209a52df2205fd88b5619df58f003
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 00000000..b4123fde
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,21 @@
+dir = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift File.join(dir, 'lib')
+require 'puppet'
+require 'rspec'
+require 'puppetlabs_spec_helper/module_spec_helper'
+#require 'rspec-hiera-puppet'
+require 'rspec-puppet/coverage'
+require 'rspec/autorun'
+
+fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
+
+RSpec.configure do |c|
+ c.module_path = File.join(fixture_path, 'modules')
+ c.manifest_dir = File.join(fixture_path, 'manifests')
+ c.pattern = "spec/*/*_spec.rb"
+end
+
+Puppet::Util::Log.level = :warning
+Puppet::Util::Log.newdestination(:console)
+
+at_exit { RSpec::Puppet::Coverage.report! } \ No newline at end of file