Skip to content

Commit

Permalink
removing the spec_acceptance_helper.rb hacks to pre-install puppet/fa…
Browse files Browse the repository at this point in the history
…cter before configuring rspec (i.e. bad rspec usage in rvm_system_spec.rb was the only reason for those hacks); note that this was meant to be included in the last commit
  • Loading branch information
jonoterc committed Jul 21, 2014
1 parent 87ec97e commit 20c5b4a
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@ def install_puppet(host)
end
end

# install puppet before configuring rspec to enable calling facter in
# spec/acceptance tests
unless (ENV['RS_PROVISION'] == 'no' || ENV['BEAKER_provision'] == 'no')
hosts.each do |host|
if host.is_pe?
install_pe
else
install_puppet(host)
# on host, "mkdir -p #{host['distmoduledir']}"
end
end
end

RSpec.configure do |c|

# Project root
Expand All @@ -42,11 +29,19 @@ def install_puppet(host)

c.before :suite do
hosts.each do |host|
unless (ENV['RS_PROVISION'] == 'no' || ENV['BEAKER_provision'] == 'no')
if host.is_pe?
install_pe
else
install_puppet(host)
end
end

# Install module and dependencies
puppet_module_install(:source => proj_root, :module_name => 'rvm')

# not included in Puppetfile.lock, version based on latest when Puppetfile.lock last set
if fact('osfamily') == 'RedHat'
# not included in Puppetfile.lock, version based on latest when Puppetfile.lock last set
on host, puppet('module', 'install', 'stahnma/epel', '--version=0.1.0'), { :acceptable_exit_codes => [0,1] }
end
# version based on current Puppetfile.lock
Expand Down

0 comments on commit 20c5b4a

Please sign in to comment.