summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet/parser')
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/any2array_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/concat_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/count_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/deep_merge_spec.rb0
-rwxr-xr-xspec/unit/puppet/parser/functions/defined_with_params_spec.rb37
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/delete_undef_values_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/delete_values_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/difference_spec.rb0
-rwxr-xr-xspec/unit/puppet/parser/functions/ensure_packages_spec.rb81
-rwxr-xr-xspec/unit/puppet/parser/functions/ensure_resource_spec.rb113
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/floor_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/get_module_path_spec.rb0
-rwxr-xr-xspec/unit/puppet/parser/functions/getparam_spec.rb76
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/getvar_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/has_key_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/hash_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/intersection_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_array_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_domain_name_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_float_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_function_available.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_hash_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_integer_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_ip_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_mac_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_numeric_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/is_string_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/join_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/keys_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/loadyaml_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/lstrip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/member_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/merge_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/num2bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/parsejson_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/parseyaml_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/pick_default_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/prefix_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/range_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/reverse_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/rstrip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/shuffle_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/size_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/sort_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/squeeze_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/str2bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/strftime_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/strip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/suffix_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/swapcase_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/time_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/type_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/union_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/unique_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/upcase_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/uriescape_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_array_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_augeas_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_cmd_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_hash_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_re_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/validate_string_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/values_at_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/values_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/zip_spec.rb0
73 files changed, 307 insertions, 0 deletions
diff --git a/spec/unit/puppet/parser/functions/any2array_spec.rb b/spec/unit/puppet/parser/functions/any2array_spec.rb
index b266e84..b266e84 100644..100755
--- a/spec/unit/puppet/parser/functions/any2array_spec.rb
+++ b/spec/unit/puppet/parser/functions/any2array_spec.rb
diff --git a/spec/unit/puppet/parser/functions/concat_spec.rb b/spec/unit/puppet/parser/functions/concat_spec.rb
index 6e67620..6e67620 100644..100755
--- a/spec/unit/puppet/parser/functions/concat_spec.rb
+++ b/spec/unit/puppet/parser/functions/concat_spec.rb
diff --git a/spec/unit/puppet/parser/functions/count_spec.rb b/spec/unit/puppet/parser/functions/count_spec.rb
index 2453815..2453815 100644..100755
--- a/spec/unit/puppet/parser/functions/count_spec.rb
+++ b/spec/unit/puppet/parser/functions/count_spec.rb
diff --git a/spec/unit/puppet/parser/functions/deep_merge_spec.rb b/spec/unit/puppet/parser/functions/deep_merge_spec.rb
index f134701..f134701 100644..100755
--- a/spec/unit/puppet/parser/functions/deep_merge_spec.rb
+++ b/spec/unit/puppet/parser/functions/deep_merge_spec.rb
diff --git a/spec/unit/puppet/parser/functions/defined_with_params_spec.rb b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb
new file mode 100755
index 0000000..28dbab3
--- /dev/null
+++ b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb
@@ -0,0 +1,37 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper'
+
+require 'rspec-puppet'
+describe 'defined_with_params' do
+ describe 'when a resource is not specified' do
+ it { should run.with_params().and_raise_error(ArgumentError) }
+ end
+ describe 'when compared against a resource with no attributes' do
+ let :pre_condition do
+ 'user { "dan": }'
+ end
+ it do
+ should run.with_params('User[dan]', {}).and_return(true)
+ should run.with_params('User[bob]', {}).and_return(false)
+ should run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false)
+ end
+ end
+
+ describe 'when compared against a resource with attributes' do
+ let :pre_condition do
+ 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}'
+ end
+ it do
+ should run.with_params('User[dan]', {}).and_return(true)
+ should run.with_params('User[dan]', '').and_return(true)
+ should run.with_params('User[dan]', {'ensure' => 'present'}
+ ).and_return(true)
+ should run.with_params('User[dan]',
+ {'ensure' => 'present', 'managehome' => false}
+ ).and_return(true)
+ should run.with_params('User[dan]',
+ {'ensure' => 'absent', 'managehome' => false}
+ ).and_return(false)
+ end
+ end
+end
diff --git a/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb b/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb
index b341d88..b341d88 100644..100755
--- a/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb
+++ b/spec/unit/puppet/parser/functions/delete_undef_values_spec.rb
diff --git a/spec/unit/puppet/parser/functions/delete_values_spec.rb b/spec/unit/puppet/parser/functions/delete_values_spec.rb
index 8d7f231..8d7f231 100644..100755
--- a/spec/unit/puppet/parser/functions/delete_values_spec.rb
+++ b/spec/unit/puppet/parser/functions/delete_values_spec.rb
diff --git a/spec/unit/puppet/parser/functions/difference_spec.rb b/spec/unit/puppet/parser/functions/difference_spec.rb
index 9feff09..9feff09 100644..100755
--- a/spec/unit/puppet/parser/functions/difference_spec.rb
+++ b/spec/unit/puppet/parser/functions/difference_spec.rb
diff --git a/spec/unit/puppet/parser/functions/ensure_packages_spec.rb b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb
new file mode 100755
index 0000000..436be10
--- /dev/null
+++ b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb
@@ -0,0 +1,81 @@
+#! /usr/bin/env ruby
+
+require 'spec_helper'
+require 'rspec-puppet'
+require 'puppet_spec/compiler'
+
+describe 'ensure_packages' do
+ include PuppetSpec::Compiler
+
+ before :each do
+ Puppet::Parser::Functions.autoloader.loadall
+ Puppet::Parser::Functions.function(:ensure_packages)
+ Puppet::Parser::Functions.function(:ensure_resource)
+ Puppet::Parser::Functions.function(:defined_with_params)
+ Puppet::Parser::Functions.function(:create_resources)
+ end
+
+ let :node do Puppet::Node.new('localhost') end
+ let :compiler do Puppet::Parser::Compiler.new(node) end
+ let :scope do
+ if Puppet.version.to_f >= 3.0
+ Puppet::Parser::Scope.new(compiler)
+ else
+ newscope = Puppet::Parser::Scope.new
+ newscope.compiler = compiler
+ newscope.source = Puppet::Resource::Type.new(:node, :localhost)
+ newscope
+ end
+ end
+
+ describe 'argument handling' do
+ it 'fails with no arguments' do
+ expect {
+ scope.function_ensure_packages([])
+ }.to raise_error(Puppet::ParseError, /0 for 1 or 2/)
+ end
+
+ it 'accepts an array of values' do
+ scope.function_ensure_packages([['foo']])
+ end
+
+ it 'accepts a single package name as a string' do
+ scope.function_ensure_packages(['foo'])
+ end
+ end
+
+ context 'given a catalog with puppet package => absent' do
+ let :catalog do
+ compile_to_catalog(<<-EOS
+ ensure_packages(['facter'])
+ package { puppet: ensure => absent }
+ EOS
+ )
+ end
+
+ it 'has no effect on Package[puppet]' do
+ expect(catalog.resource(:package, 'puppet')['ensure']).to eq('absent')
+ end
+ end
+
+ context 'given a clean catalog' do
+ let :catalog do
+ compile_to_catalog('ensure_packages(["facter"])')
+ end
+
+ it 'declares package resources with ensure => present' do
+ expect(catalog.resource(:package, 'facter')['ensure']).to eq('present')
+ end
+ end
+
+ context 'given a clean catalog and specified defaults' do
+ let :catalog do
+ compile_to_catalog('ensure_packages(["facter"], {"provider" => "gem"})')
+ end
+
+ it 'declares package resources with ensure => present' do
+ expect(catalog.resource(:package, 'facter')['ensure']).to eq('present')
+ expect(catalog.resource(:package, 'facter')['provider']).to eq('gem')
+ end
+ end
+end
diff --git a/spec/unit/puppet/parser/functions/ensure_resource_spec.rb b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb
new file mode 100755
index 0000000..33bcac0
--- /dev/null
+++ b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb
@@ -0,0 +1,113 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper'
+require 'rspec-puppet'
+require 'puppet_spec/compiler'
+
+describe 'ensure_resource' do
+ include PuppetSpec::Compiler
+
+ before :all do
+ Puppet::Parser::Functions.autoloader.loadall
+ Puppet::Parser::Functions.function(:ensure_packages)
+ end
+
+ let :node do Puppet::Node.new('localhost') end
+ let :compiler do Puppet::Parser::Compiler.new(node) end
+ let :scope do Puppet::Parser::Scope.new(compiler) end
+
+ describe 'when a type or title is not specified' do
+ it { expect { scope.function_ensure_resource([]) }.to raise_error }
+ it { expect { scope.function_ensure_resource(['type']) }.to raise_error }
+ end
+
+ describe 'when compared against a resource with no attributes' do
+ let :catalog do
+ compile_to_catalog(<<-EOS
+ user { "dan": }
+ ensure_resource('user', 'dan', {})
+ EOS
+ )
+ end
+
+ it 'should contain the the ensured resources' do
+ expect(catalog.resource(:user, 'dan').to_s).to eq('User[dan]')
+ end
+ end
+
+ describe 'works when compared against a resource with non-conflicting attributes' do
+ [
+ "ensure_resource('User', 'dan', {})",
+ "ensure_resource('User', 'dan', '')",
+ "ensure_resource('User', 'dan', {'ensure' => 'present'})",
+ "ensure_resource('User', 'dan', {'ensure' => 'present', 'managehome' => false})"
+ ].each do |ensure_resource|
+ pp = <<-EOS
+ user { "dan": ensure => present, shell => "/bin/csh", managehome => false}
+ #{ensure_resource}
+ EOS
+
+ it { expect { compile_to_catalog(pp) }.to_not raise_error }
+ end
+ end
+
+ describe 'fails when compared against a resource with conflicting attributes' do
+ pp = <<-EOS
+ user { "dan": ensure => present, shell => "/bin/csh", managehome => false}
+ ensure_resource('User', 'dan', {'ensure' => 'absent', 'managehome' => false})
+ EOS
+
+ it { expect { compile_to_catalog(pp) }.to raise_error }
+ end
+
+ describe 'when an array of new resources are passed in' do
+ let :catalog do
+ compile_to_catalog("ensure_resource('User', ['dan', 'alex'], {})")
+ end
+
+ it 'should contain the ensured resources' do
+ expect(catalog.resource('User[dan]').to_s).to eq('User[dan]')
+ expect(catalog.resource('User[alex]').to_s).to eq('User[alex]')
+ end
+ end
+
+ describe 'when an array of existing resources is compared against existing resources' do
+ pp = <<-EOS
+ user { 'dan': ensure => present; 'alex': ensure => present }
+ ensure_resource('User', ['dan', 'alex'], {})
+ EOS
+
+ let :catalog do
+ compile_to_catalog(pp)
+ end
+
+ it 'should return the existing resources' do
+ expect(catalog.resource('User[dan]').to_s).to eq('User[dan]')
+ expect(catalog.resource('User[alex]').to_s).to eq('User[alex]')
+ end
+ end
+
+ describe 'works when compared against existing resources with attributes' do
+ [
+ "ensure_resource('User', ['dan', 'alex'], {})",
+ "ensure_resource('User', ['dan', 'alex'], '')",
+ "ensure_resource('User', ['dan', 'alex'], {'ensure' => 'present'})",
+ ].each do |ensure_resource|
+ pp = <<-EOS
+ user { 'dan': ensure => present; 'alex': ensure => present }
+ #{ensure_resource}
+ EOS
+
+ it { expect { compile_to_catalog(pp) }.to_not raise_error }
+ end
+ end
+
+ describe 'fails when compared against existing resources with conflicting attributes' do
+ pp = <<-EOS
+ user { 'dan': ensure => present; 'alex': ensure => present }
+ ensure_resource('User', ['dan', 'alex'], {'ensure' => 'absent'})
+ EOS
+
+ it { expect { compile_to_catalog(pp) }.to raise_error }
+ end
+
+end
diff --git a/spec/unit/puppet/parser/functions/floor_spec.rb b/spec/unit/puppet/parser/functions/floor_spec.rb
index dbc8c77..dbc8c77 100644..100755
--- a/spec/unit/puppet/parser/functions/floor_spec.rb
+++ b/spec/unit/puppet/parser/functions/floor_spec.rb
diff --git a/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb b/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
index 2577723..2577723 100644..100755
--- a/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
+++ b/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
diff --git a/spec/unit/puppet/parser/functions/get_module_path_spec.rb b/spec/unit/puppet/parser/functions/get_module_path_spec.rb
index 486bef6..486bef6 100644..100755
--- a/spec/unit/puppet/parser/functions/get_module_path_spec.rb
+++ b/spec/unit/puppet/parser/functions/get_module_path_spec.rb
diff --git a/spec/unit/puppet/parser/functions/getparam_spec.rb b/spec/unit/puppet/parser/functions/getparam_spec.rb
new file mode 100755
index 0000000..bf024af
--- /dev/null
+++ b/spec/unit/puppet/parser/functions/getparam_spec.rb
@@ -0,0 +1,76 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper'
+require 'rspec-puppet'
+require 'puppet_spec/compiler'
+
+describe 'getparam' do
+ include PuppetSpec::Compiler
+
+ before :each do
+ Puppet::Parser::Functions.autoloader.loadall
+ Puppet::Parser::Functions.function(:getparam)
+ end
+
+ let :node do Puppet::Node.new('localhost') end
+ let :compiler do Puppet::Parser::Compiler.new(node) end
+ if Puppet.version.to_f >= 3.0
+ let :scope do Puppet::Parser::Scope.new(compiler) end
+ else
+ let :scope do
+ newscope = Puppet::Parser::Scope.new
+ newscope.compiler = compiler
+ newscope.source = Puppet::Resource::Type.new(:node, :localhost)
+ newscope
+ end
+ end
+
+ it "should exist" do
+ Puppet::Parser::Functions.function("getparam").should == "function_getparam"
+ end
+
+ describe 'when a resource is not specified' do
+ it { expect { scope.function_getparam([]) }.to raise_error }
+ it { expect { scope.function_getparam(['User[dan]']) }.to raise_error }
+ it { expect { scope.function_getparam(['User[dan]']) }.to raise_error }
+ it { expect { scope.function_getparam(['User[dan]', {}]) }.to raise_error }
+ # This seems to be OK because we just check for a string.
+ it { expect { scope.function_getparam(['User[dan]', '']) }.to_not raise_error }
+ end
+
+ describe 'when compared against a resource with no params' do
+ let :catalog do
+ compile_to_catalog(<<-EOS
+ user { "dan": }
+ EOS
+ )
+ end
+
+ it do
+ expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('')
+ end
+ end
+
+ describe 'when compared against a resource with params' do
+ let :catalog do
+ compile_to_catalog(<<-EOS
+ user { 'dan': ensure => present, shell => '/bin/sh', managehome => false}
+ $test = getparam(User[dan], 'shell')
+ EOS
+ )
+ end
+
+ it do
+ resource = Puppet::Parser::Resource.new(:user, 'dan', {:scope => scope})
+ resource.set_parameter('ensure', 'present')
+ resource.set_parameter('shell', '/bin/sh')
+ resource.set_parameter('managehome', false)
+ compiler.add_resource(scope, resource)
+
+ expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('/bin/sh')
+ expect(scope.function_getparam(['User[dan]', ''])).to eq('')
+ expect(scope.function_getparam(['User[dan]', 'ensure'])).to eq('present')
+ # TODO: Expected this to be false, figure out why we're getting '' back.
+ expect(scope.function_getparam(['User[dan]', 'managehome'])).to eq('')
+ end
+ end
+end
diff --git a/spec/unit/puppet/parser/functions/getvar_spec.rb b/spec/unit/puppet/parser/functions/getvar_spec.rb
index 5ff834e..5ff834e 100644..100755
--- a/spec/unit/puppet/parser/functions/getvar_spec.rb
+++ b/spec/unit/puppet/parser/functions/getvar_spec.rb
diff --git a/spec/unit/puppet/parser/functions/has_key_spec.rb b/spec/unit/puppet/parser/functions/has_key_spec.rb
index 490daea..490daea 100644..100755
--- a/spec/unit/puppet/parser/functions/has_key_spec.rb
+++ b/spec/unit/puppet/parser/functions/has_key_spec.rb
diff --git a/spec/unit/puppet/parser/functions/hash_spec.rb b/spec/unit/puppet/parser/functions/hash_spec.rb
index 7c91be9..7c91be9 100644..100755
--- a/spec/unit/puppet/parser/functions/hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/hash_spec.rb
diff --git a/spec/unit/puppet/parser/functions/intersection_spec.rb b/spec/unit/puppet/parser/functions/intersection_spec.rb
index fd44f7f..fd44f7f 100644..100755
--- a/spec/unit/puppet/parser/functions/intersection_spec.rb
+++ b/spec/unit/puppet/parser/functions/intersection_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_array_spec.rb b/spec/unit/puppet/parser/functions/is_array_spec.rb
index e7f4bcd..e7f4bcd 100644..100755
--- a/spec/unit/puppet/parser/functions/is_array_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_array_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_bool_spec.rb b/spec/unit/puppet/parser/functions/is_bool_spec.rb
index c94e83a..c94e83a 100644..100755
--- a/spec/unit/puppet/parser/functions/is_bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_bool_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_domain_name_spec.rb b/spec/unit/puppet/parser/functions/is_domain_name_spec.rb
index f2ea76d..f2ea76d 100644..100755
--- a/spec/unit/puppet/parser/functions/is_domain_name_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_domain_name_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_float_spec.rb b/spec/unit/puppet/parser/functions/is_float_spec.rb
index b7d73b0..b7d73b0 100644..100755
--- a/spec/unit/puppet/parser/functions/is_float_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_float_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_function_available.rb b/spec/unit/puppet/parser/functions/is_function_available.rb
index d5669a7..d5669a7 100644..100755
--- a/spec/unit/puppet/parser/functions/is_function_available.rb
+++ b/spec/unit/puppet/parser/functions/is_function_available.rb
diff --git a/spec/unit/puppet/parser/functions/is_hash_spec.rb b/spec/unit/puppet/parser/functions/is_hash_spec.rb
index bbebf39..bbebf39 100644..100755
--- a/spec/unit/puppet/parser/functions/is_hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_hash_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_integer_spec.rb b/spec/unit/puppet/parser/functions/is_integer_spec.rb
index 24141cc..24141cc 100644..100755
--- a/spec/unit/puppet/parser/functions/is_integer_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_integer_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_ip_address_spec.rb b/spec/unit/puppet/parser/functions/is_ip_address_spec.rb
index c0debb3..c0debb3 100644..100755
--- a/spec/unit/puppet/parser/functions/is_ip_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_ip_address_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_mac_address_spec.rb b/spec/unit/puppet/parser/functions/is_mac_address_spec.rb
index ca9c590..ca9c590 100644..100755
--- a/spec/unit/puppet/parser/functions/is_mac_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_mac_address_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_numeric_spec.rb b/spec/unit/puppet/parser/functions/is_numeric_spec.rb
index 1df1497..1df1497 100644..100755
--- a/spec/unit/puppet/parser/functions/is_numeric_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_numeric_spec.rb
diff --git a/spec/unit/puppet/parser/functions/is_string_spec.rb b/spec/unit/puppet/parser/functions/is_string_spec.rb
index 3756bea..3756bea 100644..100755
--- a/spec/unit/puppet/parser/functions/is_string_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_string_spec.rb
diff --git a/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb b/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb
index a52fb71..a52fb71 100644..100755
--- a/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb
+++ b/spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb
diff --git a/spec/unit/puppet/parser/functions/join_spec.rb b/spec/unit/puppet/parser/functions/join_spec.rb
index aafa1a7..aafa1a7 100644..100755
--- a/spec/unit/puppet/parser/functions/join_spec.rb
+++ b/spec/unit/puppet/parser/functions/join_spec.rb
diff --git a/spec/unit/puppet/parser/functions/keys_spec.rb b/spec/unit/puppet/parser/functions/keys_spec.rb
index fdd7a70..fdd7a70 100644..100755
--- a/spec/unit/puppet/parser/functions/keys_spec.rb
+++ b/spec/unit/puppet/parser/functions/keys_spec.rb
diff --git a/spec/unit/puppet/parser/functions/loadyaml_spec.rb b/spec/unit/puppet/parser/functions/loadyaml_spec.rb
index fe16318..fe16318 100644..100755
--- a/spec/unit/puppet/parser/functions/loadyaml_spec.rb
+++ b/spec/unit/puppet/parser/functions/loadyaml_spec.rb
diff --git a/spec/unit/puppet/parser/functions/lstrip_spec.rb b/spec/unit/puppet/parser/functions/lstrip_spec.rb
index b280ae7..b280ae7 100644..100755
--- a/spec/unit/puppet/parser/functions/lstrip_spec.rb
+++ b/spec/unit/puppet/parser/functions/lstrip_spec.rb
diff --git a/spec/unit/puppet/parser/functions/member_spec.rb b/spec/unit/puppet/parser/functions/member_spec.rb
index 6e9a023..6e9a023 100644..100755
--- a/spec/unit/puppet/parser/functions/member_spec.rb
+++ b/spec/unit/puppet/parser/functions/member_spec.rb
diff --git a/spec/unit/puppet/parser/functions/merge_spec.rb b/spec/unit/puppet/parser/functions/merge_spec.rb
index 15a5d94..15a5d94 100644..100755
--- a/spec/unit/puppet/parser/functions/merge_spec.rb
+++ b/spec/unit/puppet/parser/functions/merge_spec.rb
diff --git a/spec/unit/puppet/parser/functions/num2bool_spec.rb b/spec/unit/puppet/parser/functions/num2bool_spec.rb
index b56196d..b56196d 100644..100755
--- a/spec/unit/puppet/parser/functions/num2bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/num2bool_spec.rb
diff --git a/spec/unit/puppet/parser/functions/parsejson_spec.rb b/spec/unit/puppet/parser/functions/parsejson_spec.rb
index f179ac1..f179ac1 100644..100755
--- a/spec/unit/puppet/parser/functions/parsejson_spec.rb
+++ b/spec/unit/puppet/parser/functions/parsejson_spec.rb
diff --git a/spec/unit/puppet/parser/functions/parseyaml_spec.rb b/spec/unit/puppet/parser/functions/parseyaml_spec.rb
index 0c7aea8..0c7aea8 100644..100755
--- a/spec/unit/puppet/parser/functions/parseyaml_spec.rb
+++ b/spec/unit/puppet/parser/functions/parseyaml_spec.rb
diff --git a/spec/unit/puppet/parser/functions/pick_default_spec.rb b/spec/unit/puppet/parser/functions/pick_default_spec.rb
index c9235b5..c9235b5 100644..100755
--- a/spec/unit/puppet/parser/functions/pick_default_spec.rb
+++ b/spec/unit/puppet/parser/functions/pick_default_spec.rb
diff --git a/spec/unit/puppet/parser/functions/prefix_spec.rb b/spec/unit/puppet/parser/functions/prefix_spec.rb
index 6e8ddc5..6e8ddc5 100644..100755
--- a/spec/unit/puppet/parser/functions/prefix_spec.rb
+++ b/spec/unit/puppet/parser/functions/prefix_spec.rb
diff --git a/spec/unit/puppet/parser/functions/range_spec.rb b/spec/unit/puppet/parser/functions/range_spec.rb
index 0e1ad37..0e1ad37 100644..100755
--- a/spec/unit/puppet/parser/functions/range_spec.rb
+++ b/spec/unit/puppet/parser/functions/range_spec.rb
diff --git a/spec/unit/puppet/parser/functions/reverse_spec.rb b/spec/unit/puppet/parser/functions/reverse_spec.rb
index 1b59206..1b59206 100644..100755
--- a/spec/unit/puppet/parser/functions/reverse_spec.rb
+++ b/spec/unit/puppet/parser/functions/reverse_spec.rb
diff --git a/spec/unit/puppet/parser/functions/rstrip_spec.rb b/spec/unit/puppet/parser/functions/rstrip_spec.rb
index d90de1d..d90de1d 100644..100755
--- a/spec/unit/puppet/parser/functions/rstrip_spec.rb
+++ b/spec/unit/puppet/parser/functions/rstrip_spec.rb
diff --git a/spec/unit/puppet/parser/functions/shuffle_spec.rb b/spec/unit/puppet/parser/functions/shuffle_spec.rb
index 93346d5..93346d5 100644..100755
--- a/spec/unit/puppet/parser/functions/shuffle_spec.rb
+++ b/spec/unit/puppet/parser/functions/shuffle_spec.rb
diff --git a/spec/unit/puppet/parser/functions/size_spec.rb b/spec/unit/puppet/parser/functions/size_spec.rb
index b1c435a..b1c435a 100644..100755
--- a/spec/unit/puppet/parser/functions/size_spec.rb
+++ b/spec/unit/puppet/parser/functions/size_spec.rb
diff --git a/spec/unit/puppet/parser/functions/sort_spec.rb b/spec/unit/puppet/parser/functions/sort_spec.rb
index 3187a5a..3187a5a 100644..100755
--- a/spec/unit/puppet/parser/functions/sort_spec.rb
+++ b/spec/unit/puppet/parser/functions/sort_spec.rb
diff --git a/spec/unit/puppet/parser/functions/squeeze_spec.rb b/spec/unit/puppet/parser/functions/squeeze_spec.rb
index 60e5a30..60e5a30 100644..100755
--- a/spec/unit/puppet/parser/functions/squeeze_spec.rb
+++ b/spec/unit/puppet/parser/functions/squeeze_spec.rb
diff --git a/spec/unit/puppet/parser/functions/str2bool_spec.rb b/spec/unit/puppet/parser/functions/str2bool_spec.rb
index 73c09c7..73c09c7 100644..100755
--- a/spec/unit/puppet/parser/functions/str2bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/str2bool_spec.rb
diff --git a/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb b/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb
index df8fb8e..df8fb8e 100644..100755
--- a/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb
+++ b/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb
diff --git a/spec/unit/puppet/parser/functions/strftime_spec.rb b/spec/unit/puppet/parser/functions/strftime_spec.rb
index df42b6f..df42b6f 100644..100755
--- a/spec/unit/puppet/parser/functions/strftime_spec.rb
+++ b/spec/unit/puppet/parser/functions/strftime_spec.rb
diff --git a/spec/unit/puppet/parser/functions/strip_spec.rb b/spec/unit/puppet/parser/functions/strip_spec.rb
index fccdd26..fccdd26 100644..100755
--- a/spec/unit/puppet/parser/functions/strip_spec.rb
+++ b/spec/unit/puppet/parser/functions/strip_spec.rb
diff --git a/spec/unit/puppet/parser/functions/suffix_spec.rb b/spec/unit/puppet/parser/functions/suffix_spec.rb
index 89ba3b8..89ba3b8 100644..100755
--- a/spec/unit/puppet/parser/functions/suffix_spec.rb
+++ b/spec/unit/puppet/parser/functions/suffix_spec.rb
diff --git a/spec/unit/puppet/parser/functions/swapcase_spec.rb b/spec/unit/puppet/parser/functions/swapcase_spec.rb
index 808b415..808b415 100644..100755
--- a/spec/unit/puppet/parser/functions/swapcase_spec.rb
+++ b/spec/unit/puppet/parser/functions/swapcase_spec.rb
diff --git a/spec/unit/puppet/parser/functions/time_spec.rb b/spec/unit/puppet/parser/functions/time_spec.rb
index e9fb76e..e9fb76e 100644..100755
--- a/spec/unit/puppet/parser/functions/time_spec.rb
+++ b/spec/unit/puppet/parser/functions/time_spec.rb
diff --git a/spec/unit/puppet/parser/functions/type_spec.rb b/spec/unit/puppet/parser/functions/type_spec.rb
index 8fec88f..8fec88f 100644..100755
--- a/spec/unit/puppet/parser/functions/type_spec.rb
+++ b/spec/unit/puppet/parser/functions/type_spec.rb
diff --git a/spec/unit/puppet/parser/functions/union_spec.rb b/spec/unit/puppet/parser/functions/union_spec.rb
index 0d282ca..0d282ca 100644..100755
--- a/spec/unit/puppet/parser/functions/union_spec.rb
+++ b/spec/unit/puppet/parser/functions/union_spec.rb
diff --git a/spec/unit/puppet/parser/functions/unique_spec.rb b/spec/unit/puppet/parser/functions/unique_spec.rb
index 5d48d49..5d48d49 100644..100755
--- a/spec/unit/puppet/parser/functions/unique_spec.rb
+++ b/spec/unit/puppet/parser/functions/unique_spec.rb
diff --git a/spec/unit/puppet/parser/functions/upcase_spec.rb b/spec/unit/puppet/parser/functions/upcase_spec.rb
index 5db5513..5db5513 100644..100755
--- a/spec/unit/puppet/parser/functions/upcase_spec.rb
+++ b/spec/unit/puppet/parser/functions/upcase_spec.rb
diff --git a/spec/unit/puppet/parser/functions/uriescape_spec.rb b/spec/unit/puppet/parser/functions/uriescape_spec.rb
index 7211c88..7211c88 100644..100755
--- a/spec/unit/puppet/parser/functions/uriescape_spec.rb
+++ b/spec/unit/puppet/parser/functions/uriescape_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb b/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
index 342ae84..342ae84 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_array_spec.rb b/spec/unit/puppet/parser/functions/validate_array_spec.rb
index 4b31cfd..4b31cfd 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_array_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_array_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_augeas_spec.rb b/spec/unit/puppet/parser/functions/validate_augeas_spec.rb
index c695ba2..c695ba2 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_augeas_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_augeas_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_bool_spec.rb b/spec/unit/puppet/parser/functions/validate_bool_spec.rb
index a352d3b..a352d3b 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_bool_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_cmd_spec.rb b/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
index a6e68df..a6e68df 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_cmd_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_hash_spec.rb b/spec/unit/puppet/parser/functions/validate_hash_spec.rb
index a0c35c2..a0c35c2 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_hash_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb b/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb
index 45401a4..45401a4 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_ipv4_address_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb b/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb
index a839d90..a839d90 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_ipv6_address_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_re_spec.rb b/spec/unit/puppet/parser/functions/validate_re_spec.rb
index d29988b..d29988b 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_re_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_re_spec.rb
diff --git a/spec/unit/puppet/parser/functions/validate_string_spec.rb b/spec/unit/puppet/parser/functions/validate_string_spec.rb
index 3b4fb3e..3b4fb3e 100644..100755
--- a/spec/unit/puppet/parser/functions/validate_string_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_string_spec.rb
diff --git a/spec/unit/puppet/parser/functions/values_at_spec.rb b/spec/unit/puppet/parser/functions/values_at_spec.rb
index 08e95a5..08e95a5 100644..100755
--- a/spec/unit/puppet/parser/functions/values_at_spec.rb
+++ b/spec/unit/puppet/parser/functions/values_at_spec.rb
diff --git a/spec/unit/puppet/parser/functions/values_spec.rb b/spec/unit/puppet/parser/functions/values_spec.rb
index 14ae417..14ae417 100644..100755
--- a/spec/unit/puppet/parser/functions/values_spec.rb
+++ b/spec/unit/puppet/parser/functions/values_spec.rb
diff --git a/spec/unit/puppet/parser/functions/zip_spec.rb b/spec/unit/puppet/parser/functions/zip_spec.rb
index f45ab17..f45ab17 100644..100755
--- a/spec/unit/puppet/parser/functions/zip_spec.rb
+++ b/spec/unit/puppet/parser/functions/zip_spec.rb