Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / union_spec.rb
1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
3
4 describe 'union function' do
5   describe 'success' do
6     it 'unions arrays' do
7       pp = <<-EOS
8       $a = ["the","public"]
9       $b = ["art"]
10       $c = ["galleries"]
11       # Anagram: Large picture halls, I bet
12       $o = union($a,$b,$c)
13       notice(inline_template('union is <%= @o.inspect %>'))
14       EOS
15
16       apply_manifest(pp, :catch_failures => true) do |r|
17         expect(r.stdout).to match(/union is \["the", "public", "art", "galleries"\]/)
18       end
19     end
20   end
21   describe 'failure' do
22     it 'handles no arguments'
23     it 'handles non arrays'
24   end
25 end