Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / type_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'type function' do
4   describe 'success' do
5     pp1 = <<-DOC
6       $a = ["the","public","art","galleries"]
7       # Anagram: Large picture halls, I bet
8       $o = type($a)
9       notice(inline_template('type is <%= @o.to_s %>'))
10     DOC
11     it 'types arrays' do
12       apply_manifest(pp1, :catch_failures => true) do |r|
13         expect(r.stdout).to match(%r{type is Tuple\[String.*, String.*, String.*, String.*\]})
14       end
15     end
16
17     pp2 = <<-DOC
18       $a = "blowzy night-frumps vex'd jack q"
19       $o = type($a)
20       notice(inline_template('type is <%= @o.to_s %>'))
21     DOC
22     it 'types strings' do
23       apply_manifest(pp2, :catch_failures => true) do |r|
24         expect(r.stdout).to match(%r{type is String})
25       end
26     end
27     it 'types hashes'
28     it 'types integers'
29     it 'types floats'
30     it 'types booleans'
31   end
32   describe 'failure' do
33     it 'handles no arguments'
34   end
35 end