Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / merge_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'merge function' do
4   describe 'success' do
5     pp = <<-DOC
6       $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
7       $b = {'two' => 'dos', 'three' => { 'five' => 5 } }
8       $o = merge($a, $b)
9       notice(inline_template('merge[one]   is <%= @o["one"].inspect %>'))
10       notice(inline_template('merge[two]   is <%= @o["two"].inspect %>'))
11       notice(inline_template('merge[three] is <%= @o["three"].inspect %>'))
12     DOC
13     regex_array = [%r{merge\[one\]   is ("1"|1)}, %r{merge\[two\]   is "dos"}, %r{merge\[three\] is {"five"=>("5"|5)}}]
14     it 'merges two hashes' do
15       apply_manifest(pp, :catch_failures => true) do |r|
16         regex_array.each do |i|
17           expect(r.stdout).to match(i)
18         end
19       end
20     end
21   end
22 end