delete_at_spec.rb 433 B

1234567891011121314151617
  1. require 'spec_helper_acceptance'
  2. describe 'delete_at function' do
  3. describe 'success' do
  4. pp = <<-DOC
  5. $output = delete_at(['a','b','c','b'], 1)
  6. if $output == ['a','c','b'] {
  7. notify { 'output correct': }
  8. }
  9. DOC
  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