Skip to content

Commit ee65949

Browse files
author
Shiva Poudel
committed
Added spec_helper_acceptance.rb file
1 parent 4367d55 commit ee65949

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

spec/spec_helper_acceptance.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
require 'beaker-rspec'
2+
3+
UNSUPPORTED_PLATFORMS = [ 'windows' ]
4+
5+
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
6+
if hosts.first.is_pe?
7+
install_pe
8+
else
9+
install_puppet({ :version => '3.6.2',
10+
:facter_version => '2.1.0',
11+
:hiera_version => '1.3.4',
12+
:default_action => 'gem_install' })
13+
hosts.each {|h| on h, "/bin/echo '' > #{h['hieraconf']}" }
14+
end
15+
hosts.each do |host|
16+
on host, "mkdir -p #{host['distmoduledir']}"
17+
on host, 'puppet module install puppetlabs-stdlib', :acceptable_exit_codes => [0,1]
18+
end
19+
end
20+
21+
RSpec.configure do |c|
22+
# Project root
23+
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
24+
25+
# Readable test descriptions
26+
c.formatter = :documentation
27+
28+
# Configure all nodes in nodeset
29+
c.before :suite do
30+
# Install module
31+
puppet_module_install(:source => proj_root, :module_name => 'ntp')
32+
end
33+
end

0 commit comments

Comments
 (0)