Merge branch '1.4.x'
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec'
2
3 hosts.each do |host|
4   # Install Puppet
5   install_package host, 'rubygems'
6   on host, 'gem install puppet --no-ri --no-rdoc'
7   on host, "mkdir -p #{host['distmoduledir']}"
8 end
9
10 RSpec.configure do |c|
11   # Project root
12   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
13
14   # Readable test descriptions
15   c.formatter = :documentation
16
17   # Configure all nodes in nodeset
18   c.before :suite do
19     # Install module and dependencies
20     puppet_module_install(:source => proj_root, :module_name => 'apt')
21     hosts.each do |host|
22       shell('/bin/touch /etc/puppet/hiera.yaml')
23       shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] })
24     end
25   end
26 end