delete_spec.rb 421 B

1234567891011121314151617
  1. require 'spec_helper_acceptance'
  2. describe 'delete function' do
  3. pp = <<-DOC
  4. $output = delete(['a','b','c','b'], 'b')
  5. if $output == ['a','c'] {
  6. notify { 'output correct': }
  7. }
  8. DOC
  9. describe 'success' do
  10. it 'deletes elements of the array' do
  11. apply_manifest(pp, :catch_failures => true) do |r|
  12. expect(r.stdout).to match(%r{Notice: output correct})
  13. end
  14. end
  15. end
  16. end