6a34e21851c4a86e242acf59b6316d2f8ceb3ac2
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / delete_at_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'delete_at function' do
4   describe 'success' do
5     pp = <<-DOC
6       $output = delete_at(['a','b','c','b'], 1)
7       if $output == ['a','c','b'] {
8         notify { 'output correct': }
9       }
10     DOC
11     it 'deletes elements of the array' do
12       apply_manifest(pp, :catch_failures => true) do |r|
13         expect(r.stdout).to match(%r{Notice: output correct})
14       end
15     end
16   end
17 end