Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / type3x_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'type3x function' do
4   describe 'success' do
5     {
6       %{type3x({ 'a' => 'hash' })} => 'Hash',
7       %{type3x(['array'])}         => 'Array',
8       %{type3x(false)}             => 'Boolean',
9       %{type3x('asdf')}            => 'String',
10       %{type3x(242)}               => 'Integer',
11       %{type3x(3.14)}              => 'Float',
12     }.each do |pp, type|
13       it "with type #{type}" do
14         apply_manifest(pp, :catch_failures => true)
15       end
16     end
17   end
18
19   describe 'failure' do
20     pp_fail = <<-MANIFEST
21       type3x('one','two')
22     MANIFEST
23     it 'handles improper number of arguments' do
24       expect(apply_manifest(pp_fail, :expect_failures => true).stderr).to match(%r{Wrong number of arguments})
25     end
26   end
27 end