spec_helper_acceptance.rb 908 B

12345678910111213141516171819202122232425262728293031323334
  1. require 'beaker-rspec/spec_helper'
  2. require 'beaker-rspec/helpers/serverspec'
  3. unless ENV['RS_PROVISION'] == 'no'
  4. hosts.each do |host|
  5. if host['platform'] =~ /debian/
  6. on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
  7. end
  8. if host.is_pe?
  9. install_pe
  10. else
  11. # Install Puppet
  12. install_package host, 'rubygems'
  13. on host, 'gem install puppet --no-ri --no-rdoc'
  14. on host, "mkdir -p #{host['distmoduledir']}"
  15. end
  16. end
  17. end
  18. RSpec.configure do |c|
  19. # Project root
  20. proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
  21. # Readable test descriptions
  22. c.formatter = :documentation
  23. # Configure all nodes in nodeset
  24. c.before :suite do
  25. # Install module and dependencies
  26. puppet_module_install(:source => proj_root, :module_name => 'inifile')
  27. end
  28. c.treat_symbols_as_metadata_keys_with_true_values = true
  29. end