From 92e6aab93e081281d25ff69bdceb779943038b24 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 2 Nov 2016 22:47:30 +0100 Subject: Improve tests setup - Add .fixtures.yaml to checkout common module - Use puppetlabs-spec-helper in spec_helper.rb --- spec/spec_helper.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 21d1a98..3cca63a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,12 +1,12 @@ # https://puppetlabs.com/blog/testing-modules-in-the-puppet-forge -require 'rspec-puppet' -require 'mocha/api' +require 'puppetlabs_spec_helper/module_spec_helper' -RSpec.configure do |c| +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - c.module_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) - c.color = true +RSpec.configure do |c| - #Puppet.features.stubs(:root? => true) + c.manifest_dir = File.join(fixture_path, 'manifests') + c.module_path = File.join(fixture_path, 'modules') + c.color = true end -- cgit v1.2.3