getparam_spec.rb 578 B

12345678910111213141516171819202122
  1. require 'spec_helper_acceptance'
  2. describe 'getparam function' do
  3. describe 'success' do
  4. pp = <<-DOC
  5. notify { 'rspec':
  6. message => 'custom rspec message',
  7. }
  8. $o = getparam(Notify['rspec'], 'message')
  9. notice(inline_template('getparam is <%= @o.inspect %>'))
  10. DOC
  11. it 'getparam a notify' do
  12. apply_manifest(pp, :catch_failures => true) do |r|
  13. expect(r.stdout).to match(%r{getparam is "custom rspec message"})
  14. end
  15. end
  16. end
  17. describe 'failure' do
  18. it 'handles no arguments'
  19. it 'handles non strings'
  20. end
  21. end