5 expect(Puppet::Parser::Functions.function('type3x')).to eq('function_type3x')
8 it 'raises a ParseError if there is less than 1 arguments' do
9 expect { scope.function_type3x([]) }.to(raise_error(Puppet::ParseError))
12 it 'returns string when given a string' do
13 result = scope.function_type3x(['aaabbbbcccc'])
14 expect(result).to(eq('string'))
17 it 'returns array when given an array' do
18 result = scope.function_type3x([['aaabbbbcccc', 'asdf']])
19 expect(result).to(eq('array'))
22 it 'returns hash when given a hash' do
23 result = scope.function_type3x([{ 'a' => 1, 'b' => 2 }])
24 expect(result).to(eq('hash'))
27 it 'returns integer when given an integer' do
28 result = scope.function_type3x(['1'])
29 expect(result).to(eq('integer'))
32 it 'returns float when given a float' do
33 result = scope.function_type3x(['1.34'])
34 expect(result).to(eq('float'))
37 it 'returns boolean when given a boolean' do
38 result = scope.function_type3x([true])
39 expect(result).to(eq('boolean'))