Commit 92e6aab9 authored by varac's avatar varac
Browse files

Improve tests setup

- Add .fixtures.yaml to checkout common module
- Use puppetlabs-spec-helper in spec_helper.rb
parent aeb3bdba
fixtures:
repositories:
"common":
"repo": "https://gitlab.com/shared-puppet-modules-group/common.git"
symlinks:
"apt": "#{source_dir}"
......@@ -2,8 +2,8 @@ source "https://rubygems.org"
group :development, :unit_tests do
gem "rake"
gem "rspec", '< 3.2.0'
gem "rspec-puppet"
gem "rspec-puppet", "~> 2.1", :require => false
gem "rspec-core", "3.1.7", :require => false
gem "puppetlabs_spec_helper"
gem "metadata-json-lint"
gem "rspec-puppet-facts"
......
# 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment