root / spec / spec_helper.rb @ f8c4097f
Historique | Voir | Annoter | Télécharger (902 octets)
1 | 78f22811 | Steve Traylen | # This file is managed via modulesync
|
---|---|---|---|
2 | # https://github.com/voxpupuli/modulesync
|
||
3 | # https://github.com/voxpupuli/modulesync_config
|
||
4 | |||
5 | 59c1ddf4 | Steve Traylen | RSpec.configure do |c| |
6 | c.mock_with :mocha
|
||
7 | end
|
||
8 | |||
9 | 78f22811 | Steve Traylen | # puppetlabs_spec_helper will set up coverage if the env variable is set.
|
10 | # We want to do this if lib exists and it hasn't been explicitly set.
|
||
11 | ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__)) |
||
12 | |||
13 | require 'voxpupuli/test/spec_helper'
|
||
14 | |||
15 | if File.exist?(File.join(__dir__, 'default_module_facts.yml')) |
||
16 | facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) |
||
17 | if facts
|
||
18 | facts.each do |name, value|
|
||
19 | add_custom_fact name.to_sym, value |
||
20 | end
|
||
21 | 64134e4e | tr | end
|
22 | end
|
||
23 | 430c87b7 | Kienan Stewart | |
24 | # This loads the module data, needed to test different OSes.
|
||
25 | f8c4097f | Kienan Stewart | #RSpec.shared_context "hiera", :shared_context => :metadata do
|
26 | # let (:hiera_config) { 'hiera.yaml' }
|
||
27 | # Hiera.new({:config => 'hiera.yaml'})
|
||
28 | #end |