]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/inifile/spec/spec_helper_acceptance.rb
add puppetlabs/inifile to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / inifile / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec/spec_helper'
2 require 'beaker-rspec/helpers/serverspec'
3
4 unless ENV['RS_PROVISION'] == 'no'
5   # This will install the latest available package on el and deb based
6   # systems fail on windows and osx, and install via gem on other *nixes
7   foss_opts = {:default_action => 'gem_install'}
8
9   if default.is_pe?; then
10     install_pe;
11   else
12     install_puppet(foss_opts);
13   end
14
15   hosts.each do |host|
16     if host['platform'] =~ /debian/
17       on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
18       on host, "mkdir -p #{host['distmoduledir']}"
19     end
20   end
21 end
22
23 RSpec.configure do |c|
24   # Project root
25   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
26
27   # Readable test descriptions
28   c.formatter = :documentation
29
30   # Configure all nodes in nodeset
31   c.before :suite do
32     # Install module and dependencies
33     hosts.each do |host|
34       copy_root_module_to(host, :source => proj_root, :module_name => 'inifile')
35     end
36   end
37
38   c.treat_symbols_as_metadata_keys_with_true_values = true
39 end