diff options
author | Micah <micah@riseup.net> | 2016-11-03 17:16:07 +0000 |
---|---|---|
committer | Micah <micah@riseup.net> | 2016-11-03 17:16:07 +0000 |
commit | 9b3d0025a8a968499f5d24d76a66af0b7f1ba9cd (patch) | |
tree | 7132904362ca013463d63b1dda937260f2006066 /spec/spec_helper.rb | |
parent | c67a270a56244b859d251d050a696ec4ba0e7805 (diff) | |
parent | f4af02ee7a6d4d071506642bec1401662d1da964 (diff) |
Merge branch 'tests' into 'master'
Add rspec skeleton
See merge request !5
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6ba62e1..3cca63a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,16 +1,12 @@ -require 'pathname' -dir = Pathname.new(__FILE__).parent -$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib') -require 'puppet' -gem 'rspec', '>= 1.2.9' -require 'spec/autorun' +# https://puppetlabs.com/blog/testing-modules-in-the-puppet-forge +require 'puppetlabs_spec_helper/module_spec_helper' -Dir[File.join(File.dirname(__FILE__), 'support', '*.rb')].each do |support_file| - require support_file -end +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) + +RSpec.configure do |c| + + c.manifest_dir = File.join(fixture_path, 'manifests') + c.module_path = File.join(fixture_path, 'modules') -# We need this because the RAL uses 'should' as a method. This -# allows us the same behaviour but with a different method name. -class Object - alias :must :should + c.color = true end |