summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-x[-rw-r--r--]spec/acceptance/abs_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/any2array_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/base64_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/bool2num_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/build_csv.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/capitalize_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/chomp_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/chop_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/concat_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/count_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/deep_merge_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/defined_with_params_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/delete_at_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/delete_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/delete_undef_values_spec.rb0
-rwxr-xr-xspec/acceptance/delete_values_spec.rb25
-rwxr-xr-xspec/acceptance/difference_spec.rb26
-rwxr-xr-xspec/acceptance/dirname_spec.rb42
-rwxr-xr-xspec/acceptance/downcase_spec.rb39
-rwxr-xr-xspec/acceptance/empty_spec.rb39
-rwxr-xr-xspec/acceptance/ensure_packages_spec.rb24
-rwxr-xr-xspec/acceptance/ensure_resource_spec.rb24
-rwxr-xr-xspec/acceptance/flatten_spec.rb39
-rwxr-xr-xspec/acceptance/floor_spec.rb39
-rwxr-xr-xspec/acceptance/fqdn_rotate_spec.rb33
-rwxr-xr-xspec/acceptance/get_module_path_spec.rb41
-rwxr-xr-xspec/acceptance/getparam_spec.rb25
-rwxr-xr-xspec/acceptance/getvar_spec.rb26
-rwxr-xr-xspec/acceptance/grep_spec.rb26
-rwxr-xr-xspec/acceptance/has_interface_with_spec.rb44
-rwxr-xr-xspec/acceptance/has_ip_address_spec.rb33
-rwxr-xr-xspec/acceptance/has_ip_network_spec.rb33
-rwxr-xr-xspec/acceptance/has_key_spec.rb41
-rwxr-xr-xspec/acceptance/hash_spec.rb26
-rwxr-xr-xspec/acceptance/intersection_spec.rb27
-rwxr-xr-xspec/acceptance/is_array_spec.rb67
-rwxr-xr-xspec/acceptance/is_bool_spec.rb81
-rwxr-xr-xspec/acceptance/is_domain_name_spec.rb83
-rwxr-xr-xspec/acceptance/is_float_spec.rb86
-rwxr-xr-xspec/acceptance/is_function_available_spec.rb58
-rwxr-xr-xspec/acceptance/is_hash_spec.rb63
-rwxr-xr-xspec/acceptance/is_integer_spec.rb95
-rwxr-xr-xspec/acceptance/is_ip_address_spec.rb80
-rwxr-xr-xspec/acceptance/is_mac_address_spec.rb38
-rwxr-xr-xspec/acceptance/is_numeric_spec.rb95
-rwxr-xr-xspec/acceptance/is_string_spec.rb102
-rwxr-xr-xspec/acceptance/join_keys_to_values_spec.rb24
-rwxr-xr-xspec/acceptance/join_spec.rb26
-rwxr-xr-xspec/acceptance/keys_spec.rb23
-rw-r--r--spec/acceptance/loadyaml_spec.rb31
-rwxr-xr-xspec/acceptance/lstrip_spec.rb34
-rwxr-xr-xspec/acceptance/max_spec.rb20
-rwxr-xr-xspec/acceptance/member_spec.rb26
-rwxr-xr-xspec/acceptance/merge_spec.rb23
-rwxr-xr-xspec/acceptance/min_spec.rb20
-rw-r--r--spec/acceptance/nodesets/centos-6-vcloud.yml15
-rwxr-xr-x[-rw-r--r--]spec/acceptance/num2bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/parsejson_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/parseyaml_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/pick_default_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/pick_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/prefix_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/range_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/reject_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/reverse_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/rstrip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/shuffle_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/size_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/sort_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/squeeze_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/str2bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/str2saltedsha512_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/strftime_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/strip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/suffix_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/swapcase_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/time_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/to_bytes_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/type_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/union_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/unique_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/unsupported_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/upcase_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/uriescape_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_absolute_path_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_array_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_augeas_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_bool_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_cmd_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_hash_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_ipv4_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_ipv6_address_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_re_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_slength_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/validate_string_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/values_at_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/values_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/acceptance/zip_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/classes/anchor_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/compiler.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/database.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/matchers.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/modules.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/pops.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/scope.rb0
-rwxr-xr-x[-rw-r--r--]spec/lib/puppet_spec/settings.rb0
-rwxr-xr-x[-rw-r--r--]spec/spec_helper.rb0
-rwxr-xr-x[-rw-r--r--]spec/spec_helper_acceptance.rb20
-rwxr-xr-x[-rw-r--r--]spec/unit/facter/facter_dot_d_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/facter/pe_version_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/facter/root_home_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/facter/util/puppet_settings_spec.rb0
-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-x[-rw-r--r--]spec/unit/puppet/parser/functions/defined_with_params_spec.rb (renamed from spec/functions/defined_with_params_spec.rb)0
-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-x[-rw-r--r--]spec/unit/puppet/parser/functions/ensure_packages_spec.rb (renamed from spec/functions/ensure_packages_spec.rb)0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/parser/functions/ensure_resource_spec.rb (renamed from spec/functions/ensure_resource_spec.rb)0
-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-x[-rw-r--r--]spec/unit/puppet/parser/functions/getparam_spec.rb (renamed from spec/functions/getparam_spec.rb)0
-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
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/provider/file_line/ruby_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/type/anchor_spec.rb0
-rwxr-xr-x[-rw-r--r--]spec/unit/puppet/type/file_line_spec.rb0
188 files changed, 1751 insertions, 11 deletions
diff --git a/spec/acceptance/abs_spec.rb b/spec/acceptance/abs_spec.rb
index 8e05642..8e05642 100644..100755
--- a/spec/acceptance/abs_spec.rb
+++ b/spec/acceptance/abs_spec.rb
diff --git a/spec/acceptance/any2array_spec.rb b/spec/acceptance/any2array_spec.rb
index 467d6af..467d6af 100644..100755
--- a/spec/acceptance/any2array_spec.rb
+++ b/spec/acceptance/any2array_spec.rb
diff --git a/spec/acceptance/base64_spec.rb b/spec/acceptance/base64_spec.rb
index 97e1738..97e1738 100644..100755
--- a/spec/acceptance/base64_spec.rb
+++ b/spec/acceptance/base64_spec.rb
diff --git a/spec/acceptance/bool2num_spec.rb b/spec/acceptance/bool2num_spec.rb
index 7a70311..7a70311 100644..100755
--- a/spec/acceptance/bool2num_spec.rb
+++ b/spec/acceptance/bool2num_spec.rb
diff --git a/spec/acceptance/build_csv.rb b/spec/acceptance/build_csv.rb
index 62ecbf1..62ecbf1 100644..100755
--- a/spec/acceptance/build_csv.rb
+++ b/spec/acceptance/build_csv.rb
diff --git a/spec/acceptance/capitalize_spec.rb b/spec/acceptance/capitalize_spec.rb
index e5e7b7b..e5e7b7b 100644..100755
--- a/spec/acceptance/capitalize_spec.rb
+++ b/spec/acceptance/capitalize_spec.rb
diff --git a/spec/acceptance/chomp_spec.rb b/spec/acceptance/chomp_spec.rb
index f6c1595..f6c1595 100644..100755
--- a/spec/acceptance/chomp_spec.rb
+++ b/spec/acceptance/chomp_spec.rb
diff --git a/spec/acceptance/chop_spec.rb b/spec/acceptance/chop_spec.rb
index dbc28da..dbc28da 100644..100755
--- a/spec/acceptance/chop_spec.rb
+++ b/spec/acceptance/chop_spec.rb
diff --git a/spec/acceptance/concat_spec.rb b/spec/acceptance/concat_spec.rb
index 7bda365..7bda365 100644..100755
--- a/spec/acceptance/concat_spec.rb
+++ b/spec/acceptance/concat_spec.rb
diff --git a/spec/acceptance/count_spec.rb b/spec/acceptance/count_spec.rb
index 51a40ba..51a40ba 100644..100755
--- a/spec/acceptance/count_spec.rb
+++ b/spec/acceptance/count_spec.rb
diff --git a/spec/acceptance/deep_merge_spec.rb b/spec/acceptance/deep_merge_spec.rb
index c0f9b12..c0f9b12 100644..100755
--- a/spec/acceptance/deep_merge_spec.rb
+++ b/spec/acceptance/deep_merge_spec.rb
diff --git a/spec/acceptance/defined_with_params_spec.rb b/spec/acceptance/defined_with_params_spec.rb
index fc54450..fc54450 100644..100755
--- a/spec/acceptance/defined_with_params_spec.rb
+++ b/spec/acceptance/defined_with_params_spec.rb
diff --git a/spec/acceptance/delete_at_spec.rb b/spec/acceptance/delete_at_spec.rb
index db0c01f..db0c01f 100644..100755
--- a/spec/acceptance/delete_at_spec.rb
+++ b/spec/acceptance/delete_at_spec.rb
diff --git a/spec/acceptance/delete_spec.rb b/spec/acceptance/delete_spec.rb
index a28604c..a28604c 100644..100755
--- a/spec/acceptance/delete_spec.rb
+++ b/spec/acceptance/delete_spec.rb
diff --git a/spec/acceptance/delete_undef_values_spec.rb b/spec/acceptance/delete_undef_values_spec.rb
index b7eda19..b7eda19 100644..100755
--- a/spec/acceptance/delete_undef_values_spec.rb
+++ b/spec/acceptance/delete_undef_values_spec.rb
diff --git a/spec/acceptance/delete_values_spec.rb b/spec/acceptance/delete_values_spec.rb
new file mode 100755
index 0000000..6d2369c
--- /dev/null
+++ b/spec/acceptance/delete_values_spec.rb
@@ -0,0 +1,25 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'should delete elements of the hash' do
+ pp = <<-EOS
+ $a = { 'a' => 'A', 'b' => 'B', 'B' => 'C', 'd' => 'B' }
+ $b = { 'a' => 'A', 'B' => 'C' }
+ $o = delete_values($a, 'B')
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles non-hash arguments'
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/difference_spec.rb b/spec/acceptance/difference_spec.rb
new file mode 100755
index 0000000..2fae5c4
--- /dev/null
+++ b/spec/acceptance/difference_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'returns non-duplicates in the first array' do
+ pp = <<-EOS
+ $a = ['a','b','c']
+ $b = ['b','c','d']
+ $c = ['a']
+ $o = difference($a, $b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles non-array arguments'
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/dirname_spec.rb b/spec/acceptance/dirname_spec.rb
new file mode 100755
index 0000000..97913dd
--- /dev/null
+++ b/spec/acceptance/dirname_spec.rb
@@ -0,0 +1,42 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'dirname function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ context 'absolute path' do
+ it 'returns the dirname' do
+ pp = <<-EOS
+ $a = '/path/to/a/file.txt'
+ $b = '/path/to/a'
+ $o = dirname($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ context 'relative path' do
+ it 'returns the dirname' do
+ pp = <<-EOS
+ $a = 'path/to/a/file.txt'
+ $b = 'path/to/a'
+ $o = dirname($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/downcase_spec.rb b/spec/acceptance/downcase_spec.rb
new file mode 100755
index 0000000..bc4e706
--- /dev/null
+++ b/spec/acceptance/downcase_spec.rb
@@ -0,0 +1,39 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'downcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'returns the downcase' do
+ pp = <<-EOS
+ $a = 'AOEU'
+ $b = 'aoeu'
+ $o = downcase($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'doesn\'t affect lowercase words' do
+ pp = <<-EOS
+ $a = 'aoeu aoeu'
+ $b = 'aoeu aoeu'
+ $o = downcase($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-strings'
+ end
+end
diff --git a/spec/acceptance/empty_spec.rb b/spec/acceptance/empty_spec.rb
new file mode 100755
index 0000000..8b46aac
--- /dev/null
+++ b/spec/acceptance/empty_spec.rb
@@ -0,0 +1,39 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'recognizes empty strings' do
+ pp = <<-EOS
+ $a = ''
+ $b = true
+ $o = empty($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'recognizes non-empty strings' do
+ pp = <<-EOS
+ $a = 'aoeu'
+ $b = false
+ $o = empty($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-strings'
+ end
+end
diff --git a/spec/acceptance/ensure_packages_spec.rb b/spec/acceptance/ensure_packages_spec.rb
new file mode 100755
index 0000000..145bdc5
--- /dev/null
+++ b/spec/acceptance/ensure_packages_spec.rb
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'ensure_packages a package' do
+ apply_manifest('package { "zsh": ensure => absent, }')
+ pp = <<-EOS
+ $a = "zsh"
+ ensure_packages($a)
+ EOS
+
+ apply_manifest(pp, :expect_changes => true) do |r|
+ expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/)
+ end
+ end
+ it 'ensures a package already declared'
+ it 'takes defaults arguments'
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/ensure_resource_spec.rb b/spec/acceptance/ensure_resource_spec.rb
new file mode 100755
index 0000000..c4d8887
--- /dev/null
+++ b/spec/acceptance/ensure_resource_spec.rb
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'ensure_resource a package' do
+ apply_manifest('package { "zsh": ensure => absent, }')
+ pp = <<-EOS
+ $a = "zsh"
+ ensure_resource('package', $a)
+ EOS
+
+ apply_manifest(pp, :expect_changes => true) do |r|
+ expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/)
+ end
+ end
+ it 'ensures a resource already declared'
+ it 'takes defaults arguments'
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/flatten_spec.rb b/spec/acceptance/flatten_spec.rb
new file mode 100755
index 0000000..c4d66e0
--- /dev/null
+++ b/spec/acceptance/flatten_spec.rb
@@ -0,0 +1,39 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'flatten function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'flattens arrays' do
+ pp = <<-EOS
+ $a = ["a","b",["c",["d","e"],"f","g"]]
+ $b = ["a","b","c","d","e","f","g"]
+ $o = flatten($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'does not affect flat arrays' do
+ pp = <<-EOS
+ $a = ["a","b","c","d","e","f","g"]
+ $b = ["a","b","c","d","e","f","g"]
+ $o = flatten($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-strings'
+ end
+end
diff --git a/spec/acceptance/floor_spec.rb b/spec/acceptance/floor_spec.rb
new file mode 100755
index 0000000..0dcdad9
--- /dev/null
+++ b/spec/acceptance/floor_spec.rb
@@ -0,0 +1,39 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'floor function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'floors floats' do
+ pp = <<-EOS
+ $a = 12.8
+ $b = 12
+ $o = floor($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'floors integers' do
+ pp = <<-EOS
+ $a = 7
+ $b = 7
+ $o = floor($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-numbers'
+ end
+end
diff --git a/spec/acceptance/fqdn_rotate_spec.rb b/spec/acceptance/fqdn_rotate_spec.rb
new file mode 100755
index 0000000..b7f8bf8
--- /dev/null
+++ b/spec/acceptance/fqdn_rotate_spec.rb
@@ -0,0 +1,33 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ let(:facts_d) do
+ if fact('is_pe') == "true"
+ '/etc/puppetlabs/facter/facts.d'
+ else
+ '/etc/facter/facts.d'
+ end
+ end
+ after :each do
+ shell("if [ -f #{facts_d}/fqdn.txt ] ; then rm #{facts_d}/fqdn.txt ; fi")
+ end
+ it 'fqdn_rotates floats' do
+ shell("echo 'fqdn=fakehost.localdomain' > #{facts_d}/fqdn.txt")
+ pp = <<-EOS
+ $a = ['a','b','c','d']
+ $o = fqdn_rotate($a)
+ notice(inline_template('fqdn_rotate is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/fqdn_rotate is \["c", "d", "a", "b"\]/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-numbers'
+ end
+end
diff --git a/spec/acceptance/get_module_path_spec.rb b/spec/acceptance/get_module_path_spec.rb
new file mode 100755
index 0000000..34d91fa
--- /dev/null
+++ b/spec/acceptance/get_module_path_spec.rb
@@ -0,0 +1,41 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'get_module_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'get_module_paths stdlib' do
+ pp = <<-EOS
+ $a = $::is_pe ? {
+ 'true' => '/opt/puppet/share/puppet/modules/stdlib',
+ 'false' => '/etc/puppet/modules/stdlib',
+ }
+ $o = get_module_path('stdlib')
+ if $o == $a {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'get_module_paths dne' do
+ pp = <<-EOS
+ $a = $::is_pe ? {
+ 'true' => '/etc/puppetlabs/puppet/modules/dne',
+ 'false' => '/etc/puppet/modules/dne',
+ }
+ $o = get_module_path('dne')
+ if $o == $a {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :expect_failures => true)
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-numbers'
+ end
+end
diff --git a/spec/acceptance/getparam_spec.rb b/spec/acceptance/getparam_spec.rb
new file mode 100755
index 0000000..a84b2d1
--- /dev/null
+++ b/spec/acceptance/getparam_spec.rb
@@ -0,0 +1,25 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'getparam a package' do
+ pp = <<-EOS
+ user { "rspec":
+ ensure => present,
+ managehome => true,
+ }
+ $o = getparam(User['rspec'], 'managehome')
+ notice(inline_template('getparam is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :expect_changes => true) do |r|
+ expect(r.stdout).to match(/getparam is true/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/getvar_spec.rb b/spec/acceptance/getvar_spec.rb
new file mode 100755
index 0000000..333c467
--- /dev/null
+++ b/spec/acceptance/getvar_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'getvars from classes' do
+ pp = <<-EOS
+ class a::data { $foo = 'aoeu' }
+ include a::data
+ $b = 'aoeu'
+ $o = getvar("a::data::foo")
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-numbers'
+ end
+end
diff --git a/spec/acceptance/grep_spec.rb b/spec/acceptance/grep_spec.rb
new file mode 100755
index 0000000..b39d48e
--- /dev/null
+++ b/spec/acceptance/grep_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'grep function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'greps arrays' do
+ pp = <<-EOS
+ $a = ['aaabbb','bbbccc','dddeee']
+ $b = 'bbb'
+ $c = ['aaabbb','bbbccc']
+ $o = grep($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/has_interface_with_spec.rb b/spec/acceptance/has_interface_with_spec.rb
new file mode 100755
index 0000000..41ae19f
--- /dev/null
+++ b/spec/acceptance/has_interface_with_spec.rb
@@ -0,0 +1,44 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'has_interface_with function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'has_interface_with existing ipaddress' do
+ pp = <<-EOS
+ $a = '127.0.0.1'
+ $o = has_interface_with('ipaddress', $a)
+ notice(inline_template('has_interface_with is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_interface_with is true/)
+ end
+ end
+ it 'has_interface_with absent ipaddress' do
+ pp = <<-EOS
+ $a = '128.0.0.1'
+ $o = has_interface_with('ipaddress', $a)
+ notice(inline_template('has_interface_with is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_interface_with is false/)
+ end
+ end
+ it 'has_interface_with existing interface' do
+ pp = <<-EOS
+ $a = 'lo'
+ $o = has_interface_with($a)
+ notice(inline_template('has_interface_with is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_interface_with is true/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/has_ip_address_spec.rb b/spec/acceptance/has_ip_address_spec.rb
new file mode 100755
index 0000000..7d5fd87
--- /dev/null
+++ b/spec/acceptance/has_ip_address_spec.rb
@@ -0,0 +1,33 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'has_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'has_ip_address existing ipaddress' do
+ pp = <<-EOS
+ $a = '127.0.0.1'
+ $o = has_ip_address($a)
+ notice(inline_template('has_ip_address is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_ip_address is true/)
+ end
+ end
+ it 'has_ip_address absent ipaddress' do
+ pp = <<-EOS
+ $a = '128.0.0.1'
+ $o = has_ip_address($a)
+ notice(inline_template('has_ip_address is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_ip_address is false/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/has_ip_network_spec.rb b/spec/acceptance/has_ip_network_spec.rb
new file mode 100755
index 0000000..692eaf9
--- /dev/null
+++ b/spec/acceptance/has_ip_network_spec.rb
@@ -0,0 +1,33 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'has_ip_network function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'has_ip_network existing ipaddress' do
+ pp = <<-EOS
+ $a = '127.0.0.0'
+ $o = has_ip_network($a)
+ notice(inline_template('has_ip_network is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_ip_network is true/)
+ end
+ end
+ it 'has_ip_network absent ipaddress' do
+ pp = <<-EOS
+ $a = '128.0.0.0'
+ $o = has_ip_network($a)
+ notice(inline_template('has_ip_network is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/has_ip_network is false/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings'
+ end
+end
diff --git a/spec/acceptance/has_key_spec.rb b/spec/acceptance/has_key_spec.rb
new file mode 100755
index 0000000..c8557cb
--- /dev/null
+++ b/spec/acceptance/has_key_spec.rb
@@ -0,0 +1,41 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'has_keys in hashes' do
+ pp = <<-EOS
+ $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' }
+ $b = 'bbb'
+ $c = true
+ $o = has_key($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'has_keys not in hashes' do
+ pp = <<-EOS
+ $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' }
+ $b = 'ccc'
+ $c = false
+ $o = has_key($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-hashes'
+ end
+end
diff --git a/spec/acceptance/hash_spec.rb b/spec/acceptance/hash_spec.rb
new file mode 100755
index 0000000..ed53834
--- /dev/null
+++ b/spec/acceptance/hash_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'hashs arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','bbb','ccc','ddd','eee']
+ $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' }
+ $o = hash($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'handles odd-length arrays'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/intersection_spec.rb b/spec/acceptance/intersection_spec.rb
new file mode 100755
index 0000000..66b8652
--- /dev/null
+++ b/spec/acceptance/intersection_spec.rb
@@ -0,0 +1,27 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'intersection function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'intersections arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $b = ['bbb','ccc','ddd','eee']
+ $c = ['bbb','ccc']
+ $o = intersection($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'intersections empty arrays'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_array_spec.rb b/spec/acceptance/is_array_spec.rb
new file mode 100755
index 0000000..9c6bad7
--- /dev/null
+++ b/spec/acceptance/is_array_spec.rb
@@ -0,0 +1,67 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_arrays arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $b = true
+ $o = is_array($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_arrays empty arrays' do
+ pp = <<-EOS
+ $a = []
+ $b = true
+ $o = is_array($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_arrays strings' do
+ pp = <<-EOS
+ $a = "aoeu"
+ $b = false
+ $o = is_array($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_arrays hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'bbb'}
+ $b = false
+ $o = is_array($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_bool_spec.rb b/spec/acceptance/is_bool_spec.rb
new file mode 100755
index 0000000..60079f9
--- /dev/null
+++ b/spec/acceptance/is_bool_spec.rb
@@ -0,0 +1,81 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_bools arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $b = false
+ $o = is_bool($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_bools true' do
+ pp = <<-EOS
+ $a = true
+ $b = true
+ $o = is_bool($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_bools false' do
+ pp = <<-EOS
+ $a = false
+ $b = true
+ $o = is_bool($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_bools strings' do
+ pp = <<-EOS
+ $a = "true"
+ $b = false
+ $o = is_bool($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_bools hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'bbb'}
+ $b = false
+ $o = is_bool($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_domain_name_spec.rb b/spec/acceptance/is_domain_name_spec.rb
new file mode 100755
index 0000000..e0f03fa
--- /dev/null
+++ b/spec/acceptance/is_domain_name_spec.rb
@@ -0,0 +1,83 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_domain_name function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_domain_names arrays' do
+ pp = <<-EOS
+ $a = ['aaa.com','bbb','ccc']
+ $o = is_domain_name($a)
+ notice(inline_template('is_domain_name is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_domain_name is false/)
+ end
+ end
+ it 'is_domain_names true' do
+ pp = <<-EOS
+ $a = true
+ $o = is_domain_name($a)
+ notice(inline_template('is_domain_name is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_domain_name is false/)
+ end
+ end
+ it 'is_domain_names false' do
+ pp = <<-EOS
+ $a = false
+ $o = is_domain_name($a)
+ notice(inline_template('is_domain_name is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_domain_name is false/)
+ end
+ end
+ it 'is_domain_names strings with hyphens' do
+ pp = <<-EOS
+ $a = "3foo-bar.2bar-fuzz.com"
+ $b = true
+ $o = is_domain_name($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_domain_names strings beginning with hyphens' do
+ pp = <<-EOS
+ $a = "-bar.2bar-fuzz.com"
+ $b = false
+ $o = is_domain_name($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_domain_names hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'www.com'}
+ $o = is_domain_name($a)
+ notice(inline_template('is_domain_name is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_domain_name is false/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_float_spec.rb b/spec/acceptance/is_float_spec.rb
new file mode 100755
index 0000000..79b01f0
--- /dev/null
+++ b/spec/acceptance/is_float_spec.rb
@@ -0,0 +1,86 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_float function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_floats arrays' do
+ pp = <<-EOS
+ $a = ['aaa.com','bbb','ccc']
+ $o = is_float($a)
+ notice(inline_template('is_floats is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_float is false/)
+ end
+ end
+ it 'is_floats true' do
+ pp = <<-EOS
+ $a = true
+ $o = is_float($a)
+ notice(inline_template('is_floats is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_float is false/)
+ end
+ end
+ it 'is_floats strings' do
+ pp = <<-EOS
+ $a = "3.5"
+ $b = true
+ $o = is_float($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_floats floats' do
+ pp = <<-EOS
+ $a = 3.5
+ $b = true
+ $o = is_float($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_floats integers' do
+ pp = <<-EOS
+ $a = 3
+ $b = false
+ $o = is_float($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_floats hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'www.com'}
+ $o = is_float($a)
+ notice(inline_template('is_float is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_floats is false/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_function_available_spec.rb b/spec/acceptance/is_function_available_spec.rb
new file mode 100755
index 0000000..2b5dd6d
--- /dev/null
+++ b/spec/acceptance/is_function_available_spec.rb
@@ -0,0 +1,58 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_function_available function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_function_availables arrays' do
+ pp = <<-EOS
+ $a = ['fail','include','require']
+ $o = is_function_available($a)
+ notice(inline_template('is_function_available is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_function_available is false/)
+ end
+ end
+ it 'is_function_availables true' do
+ pp = <<-EOS
+ $a = true
+ $o = is_function_available($a)
+ notice(inline_template('is_function_available is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_function_available is false/)
+ end
+ end
+ it 'is_function_availables strings' do
+ pp = <<-EOS
+ $a = "fail"
+ $b = true
+ $o = is_function_available($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_function_availables function_availables' do
+ pp = <<-EOS
+ $a = "is_function_available"
+ $o = is_function_available($a)
+ notice(inline_template('is_function_available is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_function_available is true/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_hash_spec.rb b/spec/acceptance/is_hash_spec.rb
new file mode 100755
index 0000000..2ef310a
--- /dev/null
+++ b/spec/acceptance/is_hash_spec.rb
@@ -0,0 +1,63 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_hashs arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $o = is_hash($a)
+ notice(inline_template('is_hash is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_hash is false/)
+ end
+ end
+ it 'is_hashs empty hashs' do
+ pp = <<-EOS
+ $a = {}
+ $b = true
+ $o = is_hash($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_hashs strings' do
+ pp = <<-EOS
+ $a = "aoeu"
+ $b = false
+ $o = is_hash($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_hashs hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'bbb'}
+ $b = true
+ $o = is_hash($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/is_integer_spec.rb b/spec/acceptance/is_integer_spec.rb
new file mode 100755
index 0000000..bf6902b
--- /dev/null
+++ b/spec/acceptance/is_integer_spec.rb
@@ -0,0 +1,95 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_integer function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_integers arrays' do
+ pp = <<-EOS
+ $a = ['aaa.com','bbb','ccc']
+ $b = false
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_integers true' do
+ pp = <<-EOS
+ $a = true
+ $b = false
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_integers strings' do
+ pp = <<-EOS
+ $a = "3"
+ $b = true
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_integers floats' do
+ pp = <<-EOS
+ $a = 3.5
+ $b = false
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_integers integers' do
+ pp = <<-EOS
+ $a = 3
+ $b = true
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_integers hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'www.com'}
+ $b = false
+ $o = is_integer($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_ip_address_spec.rb b/spec/acceptance/is_ip_address_spec.rb
new file mode 100755
index 0000000..ed7a854
--- /dev/null
+++ b/spec/acceptance/is_ip_address_spec.rb
@@ -0,0 +1,80 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_ip_addresss ipv4' do
+ pp = <<-EOS
+ $a = '1.2.3.4'
+ $b = true
+ $o = is_ip_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_ip_addresss ipv6' do
+ pp = <<-EOS
+ $a = "fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74"
+ $b = true
+ $o = is_ip_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_ip_addresss ipv6 compressed' do
+ pp = <<-EOS
+ $a = "fe00::1"
+ $b = true
+ $o = is_ip_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_ip_addresss strings' do
+ pp = <<-EOS
+ $a = "aoeu"
+ $b = false
+ $o = is_ip_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_ip_addresss ipv4 out of range' do
+ pp = <<-EOS
+ $a = '1.2.3.400'
+ $b = false
+ $o = is_ip_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/is_mac_address_spec.rb b/spec/acceptance/is_mac_address_spec.rb
new file mode 100755
index 0000000..a2c892f
--- /dev/null
+++ b/spec/acceptance/is_mac_address_spec.rb
@@ -0,0 +1,38 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_mac_addresss a mac' do
+ pp = <<-EOS
+ $a = '00:a0:1f:12:7f:a0'
+ $b = true
+ $o = is_mac_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_mac_addresss a mac out of range' do
+ pp = <<-EOS
+ $a = '00:a0:1f:12:7f:g0'
+ $b = false
+ $o = is_mac_address($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/is_numeric_spec.rb b/spec/acceptance/is_numeric_spec.rb
new file mode 100755
index 0000000..21c8988
--- /dev/null
+++ b/spec/acceptance/is_numeric_spec.rb
@@ -0,0 +1,95 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_numeric function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_numerics arrays' do
+ pp = <<-EOS
+ $a = ['aaa.com','bbb','ccc']
+ $b = false
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_numerics true' do
+ pp = <<-EOS
+ $a = true
+ $b = false
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_numerics strings' do
+ pp = <<-EOS
+ $a = "3"
+ $b = true
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_numerics floats' do
+ pp = <<-EOS
+ $a = 3.5
+ $b = true
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_numerics integers' do
+ pp = <<-EOS
+ $a = 3
+ $b = true
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_numerics hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'www.com'}
+ $b = false
+ $o = is_numeric($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ it 'handles non-arrays'
+ end
+end
diff --git a/spec/acceptance/is_string_spec.rb b/spec/acceptance/is_string_spec.rb
new file mode 100755
index 0000000..bda6cd7
--- /dev/null
+++ b/spec/acceptance/is_string_spec.rb
@@ -0,0 +1,102 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'is_strings arrays' do
+ pp = <<-EOS
+ $a = ['aaa.com','bbb','ccc']
+ $b = false
+ $o = is_string($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_strings true' do
+ pp = <<-EOS
+ $a = true
+ $b = false
+ $o = is_string($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_strings strings' do
+ pp = <<-EOS
+ $a = "aoeu"
+ $o = is_string($a)
+ notice(inline_template('is_string is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_string is true/)
+ end
+ end
+ it 'is_strings number strings' do
+ pp = <<-EOS
+ $a = "3"
+ $o = is_string($a)
+ notice(inline_template('is_string is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/is_string is true/)
+ end
+ end
+ it 'is_strings floats' do
+ pp = <<-EOS
+ $a = 3.5
+ $b = false
+ $o = is_string($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_strings integers' do
+ pp = <<-EOS
+ $a = 3
+ $b = false
+ $o = is_string($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'is_strings hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'www.com'}
+ $b = false
+ $o = is_string($a)
+ if $o == $b {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/join_keys_to_values_spec.rb b/spec/acceptance/join_keys_to_values_spec.rb
new file mode 100755
index 0000000..70493fd
--- /dev/null
+++ b/spec/acceptance/join_keys_to_values_spec.rb
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'join_keys_to_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'join_keys_to_valuess hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'bbb','ccc'=>'ddd'}
+ $b = ':'
+ $o = join_keys_to_values($a,$b)
+ notice(inline_template('join_keys_to_values is <%= @o.sort.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/join_keys_to_values is \["aaa:bbb", "ccc:ddd"\]/)
+ end
+ end
+ it 'handles non hashes'
+ it 'handles empty hashes'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/join_spec.rb b/spec/acceptance/join_spec.rb
new file mode 100755
index 0000000..5397ce2
--- /dev/null
+++ b/spec/acceptance/join_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'join function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'joins arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $b = ':'
+ $c = 'aaa:bbb:ccc'
+ $o = join($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'handles non arrays'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/keys_spec.rb b/spec/acceptance/keys_spec.rb
new file mode 100755
index 0000000..176918e
--- /dev/null
+++ b/spec/acceptance/keys_spec.rb
@@ -0,0 +1,23 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'keyss hashes' do
+ pp = <<-EOS
+ $a = {'aaa'=>'bbb','ccc'=>'ddd'}
+ $o = keys($a)
+ notice(inline_template('keys is <%= @o.sort.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/keys is \["aaa", "ccc"\]/)
+ end
+ end
+ it 'handles non hashes'
+ it 'handles empty hashes'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/loadyaml_spec.rb b/spec/acceptance/loadyaml_spec.rb
new file mode 100644
index 0000000..944a727
--- /dev/null
+++ b/spec/acceptance/loadyaml_spec.rb
@@ -0,0 +1,31 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'loadyamls array of values' do
+ shell('echo "---
+ aaa: 1
+ bbb: 2
+ ccc: 3
+ ddd: 4" > /testyaml.yaml')
+ pp = <<-EOS
+ $o = loadyaml('/testyaml.yaml')
+ notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>'))
+ notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>'))
+ notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>'))
+ notice(inline_template('loadyaml[ddd] is <%= @o["ddd"].inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/loadyaml\[aaa\] is 1/)
+ expect(r.stdout).to match(/loadyaml\[bbb\] is 2/)
+ expect(r.stdout).to match(/loadyaml\[ccc\] is 3/)
+ expect(r.stdout).to match(/loadyaml\[ddd\] is 4/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'fails with no arguments'
+ end
+end
diff --git a/spec/acceptance/lstrip_spec.rb b/spec/acceptance/lstrip_spec.rb
new file mode 100755
index 0000000..3dc952f
--- /dev/null
+++ b/spec/acceptance/lstrip_spec.rb
@@ -0,0 +1,34 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'lstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'lstrips arrays' do
+ pp = <<-EOS
+ $a = [" the "," public "," art","galleries "]
+ # Anagram: Large picture halls, I bet
+ $o = lstrip($a)
+ notice(inline_template('lstrip is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/lstrip is \["the ", "public ", "art", "galleries "\]/)
+ end
+ end
+ it 'lstrips strings' do
+ pp = <<-EOS
+ $a = " blowzy night-frumps vex'd jack q "
+ $o = lstrip($a)
+ notice(inline_template('lstrip is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/lstrip is "blowzy night-frumps vex'd jack q "/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ it 'handles non strings or arrays'
+ end
+end
diff --git a/spec/acceptance/max_spec.rb b/spec/acceptance/max_spec.rb
new file mode 100755
index 0000000..f04e3d2
--- /dev/null
+++ b/spec/acceptance/max_spec.rb
@@ -0,0 +1,20 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'max function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'maxs arrays' do
+ pp = <<-EOS
+ $o = max("the","public","art","galleries")
+ notice(inline_template('max is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/max is "the"/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ end
+end
diff --git a/spec/acceptance/member_spec.rb b/spec/acceptance/member_spec.rb
new file mode 100755
index 0000000..b467dbb
--- /dev/null
+++ b/spec/acceptance/member_spec.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'member function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'members arrays' do
+ pp = <<-EOS
+ $a = ['aaa','bbb','ccc']
+ $b = 'ccc'
+ $c = true
+ $o = member($a,$b)
+ if $o == $c {
+ notify { 'output correct': }
+ }
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Notice: output correct/)
+ end
+ end
+ it 'members arrays without members'
+ end
+ describe 'failure' do
+ it 'handles improper argument counts'
+ end
+end
diff --git a/spec/acceptance/merge_spec.rb b/spec/acceptance/merge_spec.rb
new file mode 100755
index 0000000..a60e784
--- /dev/null
+++ b/spec/acceptance/merge_spec.rb
@@ -0,0 +1,23 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'should merge two hashes' do
+ pp = <<-EOS
+ $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
+ $b = {'two' => 'dos', 'three' => { 'five' => 5 } }
+ $o = merge($a, $b)
+ notice(inline_template('merge[one] is <%= @o["one"].inspect %>'))
+ notice(inline_template('merge[two] is <%= @o["two"].inspect %>'))
+ notice(inline_template('merge[three] is <%= @o["three"].inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/merge\[one\] is "1"/)
+ expect(r.stdout).to match(/merge\[two\] is "dos"/)
+ expect(r.stdout).to match(/merge\[three\] is {"five"=>"5"}/)
+ end
+ end
+ end
+end
diff --git a/spec/acceptance/min_spec.rb b/spec/acceptance/min_spec.rb
new file mode 100755
index 0000000..509092d
--- /dev/null
+++ b/spec/acceptance/min_spec.rb
@@ -0,0 +1,20 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'mins arrays' do
+ pp = <<-EOS
+ $o = min("the","public","art","galleries")
+ notice(inline_template('min is <%= @o.inspect %>'))
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/min is "art"/)
+ end
+ end
+ end
+ describe 'failure' do
+ it 'handles no arguments'
+ end
+end
diff --git a/spec/acceptance/nodesets/centos-6-vcloud.yml b/spec/acceptance/nodesets/centos-6-vcloud.yml
new file mode 100644
index 0000000..ca9c1d3
--- /dev/null
+++ b/spec/acceptance/nodesets/centos-6-vcloud.yml
@@ -0,0 +1,15 @@
+HOSTS:
+ 'centos-6-vcloud':
+ roles:
+ - master
+ platform: el-6-x86_64
+ hypervisor: vcloud
+ template: centos-6-x86_64
+CONFIG:
+ type: foss
+ ssh:
+ keys: "~/.ssh/id_rsa-acceptance"
+ datastore: instance0
+ folder: Delivery/Quality Assurance/Enterprise/Dynamic
+ resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
+ pooling_api: http://vcloud.delivery.puppetlabs.net/
diff --git a/spec/acceptance/num2bool_spec.rb b/spec/acceptance/num2bool_spec.rb
index 1d99ba0..1d99ba0 100644..100755
--- a/spec/acceptance/num2bool_spec.rb
+++ b/spec/acceptance/num2bool_spec.rb
diff --git a/spec/acceptance/parsejson_spec.rb b/spec/acceptance/parsejson_spec.rb
index 5097810..5097810 100644..100755
--- a/spec/acceptance/parsejson_spec.rb
+++ b/spec/acceptance/parsejson_spec.rb
diff --git a/spec/acceptance/parseyaml_spec.rb b/spec/acceptance/parseyaml_spec.rb
index 4b4bf3d..4b4bf3d 100644..100755
--- a/spec/acceptance/parseyaml_spec.rb
+++ b/spec/acceptance/parseyaml_spec.rb
diff --git a/spec/acceptance/pick_default_spec.rb b/spec/acceptance/pick_default_spec.rb
index a663f54..a663f54 100644..100755
--- a/spec/acceptance/pick_default_spec.rb
+++ b/spec/acceptance/pick_default_spec.rb
diff --git a/spec/acceptance/pick_spec.rb b/spec/acceptance/pick_spec.rb
index 46cf63f..46cf63f 100644..100755
--- a/spec/acceptance/pick_spec.rb
+++ b/spec/acceptance/pick_spec.rb
diff --git a/spec/acceptance/prefix_spec.rb b/spec/acceptance/prefix_spec.rb
index de55530..de55530 100644..100755
--- a/spec/acceptance/prefix_spec.rb
+++ b/spec/acceptance/prefix_spec.rb
diff --git a/spec/acceptance/range_spec.rb b/spec/acceptance/range_spec.rb
index a3ccd33..a3ccd33 100644..100755
--- a/spec/acceptance/range_spec.rb
+++ b/spec/acceptance/range_spec.rb
diff --git a/spec/acceptance/reject_spec.rb b/spec/acceptance/reject_spec.rb
index 7f16a00..7f16a00 100644..100755
--- a/spec/acceptance/reject_spec.rb
+++ b/spec/acceptance/reject_spec.rb
diff --git a/spec/acceptance/reverse_spec.rb b/spec/acceptance/reverse_spec.rb
index c3f0156..c3f0156 100644..100755
--- a/spec/acceptance/reverse_spec.rb
+++ b/spec/acceptance/reverse_spec.rb
diff --git a/spec/acceptance/rstrip_spec.rb b/spec/acceptance/rstrip_spec.rb
index b57a8b0..b57a8b0 100644..100755
--- a/spec/acceptance/rstrip_spec.rb
+++ b/spec/acceptance/rstrip_spec.rb
diff --git a/spec/acceptance/shuffle_spec.rb b/spec/acceptance/shuffle_spec.rb
index 02d1201..02d1201 100644..100755
--- a/spec/acceptance/shuffle_spec.rb
+++ b/spec/acceptance/shuffle_spec.rb
diff --git a/spec/acceptance/size_spec.rb b/spec/acceptance/size_spec.rb
index a52b778..a52b778 100644..100755
--- a/spec/acceptance/size_spec.rb
+++ b/spec/acceptance/size_spec.rb
diff --git a/spec/acceptance/sort_spec.rb b/spec/acceptance/sort_spec.rb
index c85bfab..c85bfab 100644..100755
--- a/spec/acceptance/sort_spec.rb
+++ b/spec/acceptance/sort_spec.rb
diff --git a/spec/acceptance/squeeze_spec.rb b/spec/acceptance/squeeze_spec.rb
index 400a458..400a458 100644..100755
--- a/spec/acceptance/squeeze_spec.rb
+++ b/spec/acceptance/squeeze_spec.rb
diff --git a/spec/acceptance/str2bool_spec.rb b/spec/acceptance/str2bool_spec.rb
index cf549da..cf549da 100644..100755
--- a/spec/acceptance/str2bool_spec.rb
+++ b/spec/acceptance/str2bool_spec.rb
diff --git a/spec/acceptance/str2saltedsha512_spec.rb b/spec/acceptance/str2saltedsha512_spec.rb
index 993e63b..993e63b 100644..100755
--- a/spec/acceptance/str2saltedsha512_spec.rb
+++ b/spec/acceptance/str2saltedsha512_spec.rb
diff --git a/spec/acceptance/strftime_spec.rb b/spec/acceptance/strftime_spec.rb
index 53b7f90..53b7f90 100644..100755
--- a/spec/acceptance/strftime_spec.rb
+++ b/spec/acceptance/strftime_spec.rb
diff --git a/spec/acceptance/strip_spec.rb b/spec/acceptance/strip_spec.rb
index 906fd7a..906fd7a 100644..100755
--- a/spec/acceptance/strip_spec.rb
+++ b/spec/acceptance/strip_spec.rb
diff --git a/spec/acceptance/suffix_spec.rb b/spec/acceptance/suffix_spec.rb
index 630f866..630f866 100644..100755
--- a/spec/acceptance/suffix_spec.rb
+++ b/spec/acceptance/suffix_spec.rb
diff --git a/spec/acceptance/swapcase_spec.rb b/spec/acceptance/swapcase_spec.rb
index b7894fb..b7894fb 100644..100755
--- a/spec/acceptance/swapcase_spec.rb
+++ b/spec/acceptance/swapcase_spec.rb
diff --git a/spec/acceptance/time_spec.rb b/spec/acceptance/time_spec.rb
index cdb2960..cdb2960 100644..100755
--- a/spec/acceptance/time_spec.rb
+++ b/spec/acceptance/time_spec.rb
diff --git a/spec/acceptance/to_bytes_spec.rb b/spec/acceptance/to_bytes_spec.rb
index 2b4c61f..2b4c61f 100644..100755
--- a/spec/acceptance/to_bytes_spec.rb
+++ b/spec/acceptance/to_bytes_spec.rb
diff --git a/spec/acceptance/type_spec.rb b/spec/acceptance/type_spec.rb
index 0043aad..0043aad 100644..100755
--- a/spec/acceptance/type_spec.rb
+++ b/spec/acceptance/type_spec.rb
diff --git a/spec/acceptance/union_spec.rb b/spec/acceptance/union_spec.rb
index 6db8d0c..6db8d0c 100644..100755
--- a/spec/acceptance/union_spec.rb
+++ b/spec/acceptance/union_spec.rb
diff --git a/spec/acceptance/unique_spec.rb b/spec/acceptance/unique_spec.rb
index bfadad1..bfadad1 100644..100755
--- a/spec/acceptance/unique_spec.rb
+++ b/spec/acceptance/unique_spec.rb
diff --git a/spec/acceptance/unsupported_spec.rb b/spec/acceptance/unsupported_spec.rb
index 1c559f6..1c559f6 100644..100755
--- a/spec/acceptance/unsupported_spec.rb
+++ b/spec/acceptance/unsupported_spec.rb
diff --git a/spec/acceptance/upcase_spec.rb b/spec/acceptance/upcase_spec.rb
index 3d2906d..3d2906d 100644..100755
--- a/spec/acceptance/upcase_spec.rb
+++ b/spec/acceptance/upcase_spec.rb
diff --git a/spec/acceptance/uriescape_spec.rb b/spec/acceptance/uriescape_spec.rb
index 7e30205..7e30205 100644..100755
--- a/spec/acceptance/uriescape_spec.rb
+++ b/spec/acceptance/uriescape_spec.rb
diff --git a/spec/acceptance/validate_absolute_path_spec.rb b/spec/acceptance/validate_absolute_path_spec.rb
index 7082e84..7082e84 100644..100755
--- a/spec/acceptance/validate_absolute_path_spec.rb
+++ b/spec/acceptance/validate_absolute_path_spec.rb
diff --git a/spec/acceptance/validate_array_spec.rb b/spec/acceptance/validate_array_spec.rb
index b53e98c..b53e98c 100644..100755
--- a/spec/acceptance/validate_array_spec.rb
+++ b/spec/acceptance/validate_array_spec.rb
diff --git a/spec/acceptance/validate_augeas_spec.rb b/spec/acceptance/validate_augeas_spec.rb
index aeec67a..aeec67a 100644..100755
--- a/spec/acceptance/validate_augeas_spec.rb
+++ b/spec/acceptance/validate_augeas_spec.rb
diff --git a/spec/acceptance/validate_bool_spec.rb b/spec/acceptance/validate_bool_spec.rb
index c837f08..c837f08 100644..100755
--- a/spec/acceptance/validate_bool_spec.rb
+++ b/spec/acceptance/validate_bool_spec.rb
diff --git a/spec/acceptance/validate_cmd_spec.rb b/spec/acceptance/validate_cmd_spec.rb
index 385676d..385676d 100644..100755
--- a/spec/acceptance/validate_cmd_spec.rb
+++ b/spec/acceptance/validate_cmd_spec.rb
diff --git a/spec/acceptance/validate_hash_spec.rb b/spec/acceptance/validate_hash_spec.rb
index 52fb615..52fb615 100644..100755
--- a/spec/acceptance/validate_hash_spec.rb
+++ b/spec/acceptance/validate_hash_spec.rb
diff --git a/spec/acceptance/validate_ipv4_address_spec.rb b/spec/acceptance/validate_ipv4_address_spec.rb
index 64841c3..64841c3 100644..100755
--- a/spec/acceptance/validate_ipv4_address_spec.rb
+++ b/spec/acceptance/validate_ipv4_address_spec.rb
diff --git a/spec/acceptance/validate_ipv6_address_spec.rb b/spec/acceptance/validate_ipv6_address_spec.rb
index 6426d1a..6426d1a 100644..100755
--- a/spec/acceptance/validate_ipv6_address_spec.rb
+++ b/spec/acceptance/validate_ipv6_address_spec.rb
diff --git a/spec/acceptance/validate_re_spec.rb b/spec/acceptance/validate_re_spec.rb
index 22f6d47..22f6d47 100644..100755
--- a/spec/acceptance/validate_re_spec.rb
+++ b/spec/acceptance/validate_re_spec.rb
diff --git a/spec/acceptance/validate_slength_spec.rb b/spec/acceptance/validate_slength_spec.rb
index 1ab2bb9..1ab2bb9 100644..100755
--- a/spec/acceptance/validate_slength_spec.rb
+++ b/spec/acceptance/validate_slength_spec.rb
diff --git a/spec/acceptance/validate_string_spec.rb b/spec/acceptance/validate_string_spec.rb
index 8956f48..8956f48 100644..100755
--- a/spec/acceptance/validate_string_spec.rb
+++ b/spec/acceptance/validate_string_spec.rb
diff --git a/spec/acceptance/values_at_spec.rb b/spec/acceptance/values_at_spec.rb
index da63cf3..da63cf3 100644..100755
--- a/spec/acceptance/values_at_spec.rb
+++ b/spec/acceptance/values_at_spec.rb
diff --git a/spec/acceptance/values_spec.rb b/spec/acceptance/values_spec.rb
index 7ef956e..7ef956e 100644..100755
--- a/spec/acceptance/values_spec.rb
+++ b/spec/acceptance/values_spec.rb
diff --git a/spec/acceptance/zip_spec.rb b/spec/acceptance/zip_spec.rb
index 0e924e8..0e924e8 100644..100755
--- a/spec/acceptance/zip_spec.rb
+++ b/spec/acceptance/zip_spec.rb
diff --git a/spec/classes/anchor_spec.rb b/spec/classes/anchor_spec.rb
index 2d4455e..2d4455e 100644..100755
--- a/spec/classes/anchor_spec.rb
+++ b/spec/classes/anchor_spec.rb
diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb
index 2f0ae4d..2f0ae4d 100644..100755
--- a/spec/lib/puppet_spec/compiler.rb
+++ b/spec/lib/puppet_spec/compiler.rb
diff --git a/spec/lib/puppet_spec/database.rb b/spec/lib/puppet_spec/database.rb
index f5c2341..f5c2341 100644..100755
--- a/spec/lib/puppet_spec/database.rb
+++ b/spec/lib/puppet_spec/database.rb
diff --git a/spec/lib/puppet_spec/matchers.rb b/spec/lib/puppet_spec/matchers.rb
index 093d77c..093d77c 100644..100755
--- a/spec/lib/puppet_spec/matchers.rb
+++ b/spec/lib/puppet_spec/matchers.rb
diff --git a/spec/lib/puppet_spec/modules.rb b/spec/lib/puppet_spec/modules.rb
index 910c6d9..910c6d9 100644..100755
--- a/spec/lib/puppet_spec/modules.rb
+++ b/spec/lib/puppet_spec/modules.rb
diff --git a/spec/lib/puppet_spec/pops.rb b/spec/lib/puppet_spec/pops.rb
index e056a52..e056a52 100644..100755
--- a/spec/lib/puppet_spec/pops.rb
+++ b/spec/lib/puppet_spec/pops.rb
diff --git a/spec/lib/puppet_spec/scope.rb b/spec/lib/puppet_spec/scope.rb
index 3847ede..3847ede 100644..100755
--- a/spec/lib/puppet_spec/scope.rb
+++ b/spec/lib/puppet_spec/scope.rb
diff --git a/spec/lib/puppet_spec/settings.rb b/spec/lib/puppet_spec/settings.rb
index 8ddcb97..8ddcb97 100644..100755
--- a/spec/lib/puppet_spec/settings.rb
+++ b/spec/lib/puppet_spec/settings.rb
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 78925fd..78925fd 100644..100755
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index f388729..8e56daa 100644..100755
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -4,14 +4,16 @@ require 'beaker-rspec'
UNSUPPORTED_PLATFORMS = []
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
+ if hosts.first.is_pe?
+ install_pe
+ on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d'
+ else
+ install_puppet
+ on hosts, 'mkdir -p /etc/facter/facts.d'
+ on hosts, '/bin/touch /etc/puppet/hiera.yaml'
+ end
hosts.each do |host|
- # Install Puppet
- if host.is_pe?
- install_pe
- else
- install_puppet
- on host, "mkdir -p #{host['distmoduledir']}"
- end
+ on host, "mkdir -p #{host['distmoduledir']}"
end
end
@@ -24,10 +26,6 @@ RSpec.configure do |c|
# Configure all nodes in nodeset
c.before :suite do
- # Install module and dependencies
puppet_module_install(:source => proj_root, :module_name => 'stdlib')
- hosts.each do |host|
- shell('/bin/touch /etc/puppet/hiera.yaml')
- end
end
end
diff --git a/spec/unit/facter/facter_dot_d_spec.rb b/spec/unit/facter/facter_dot_d_spec.rb
index 2fb72b2..2fb72b2 100644..100755
--- a/spec/unit/facter/facter_dot_d_spec.rb
+++ b/spec/unit/facter/facter_dot_d_spec.rb
diff --git a/spec/unit/facter/pe_version_spec.rb b/spec/unit/facter/pe_version_spec.rb
index 931c6d4..931c6d4 100644..100755
--- a/spec/unit/facter/pe_version_spec.rb
+++ b/spec/unit/facter/pe_version_spec.rb
diff --git a/spec/unit/facter/root_home_spec.rb b/spec/unit/facter/root_home_spec.rb
index 73eb3ea..73eb3ea 100644..100755
--- a/spec/unit/facter/root_home_spec.rb
+++ b/spec/unit/facter/root_home_spec.rb
diff --git a/spec/unit/facter/util/puppet_settings_spec.rb b/spec/unit/facter/util/puppet_settings_spec.rb
index e77779b..e77779b 100644..100755
--- a/spec/unit/facter/util/puppet_settings_spec.rb
+++ b/spec/unit/facter/util/puppet_settings_spec.rb
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/functions/defined_with_params_spec.rb b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb
index 28dbab3..28dbab3 100644..100755
--- a/spec/functions/defined_with_params_spec.rb
+++ b/spec/unit/puppet/parser/functions/defined_with_params_spec.rb
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/functions/ensure_packages_spec.rb b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb
index 436be10..436be10 100644..100755
--- a/spec/functions/ensure_packages_spec.rb
+++ b/spec/unit/puppet/parser/functions/ensure_packages_spec.rb
diff --git a/spec/functions/ensure_resource_spec.rb b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb
index 33bcac0..33bcac0 100644..100755
--- a/spec/functions/ensure_resource_spec.rb
+++ b/spec/unit/puppet/parser/functions/ensure_resource_spec.rb
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/functions/getparam_spec.rb b/spec/unit/puppet/parser/functions/getparam_spec.rb
index bf024af..bf024af 100644..100755
--- a/spec/functions/getparam_spec.rb
+++ b/spec/unit/puppet/parser/functions/getparam_spec.rb
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
diff --git a/spec/unit/puppet/provider/file_line/ruby_spec.rb b/spec/unit/puppet/provider/file_line/ruby_spec.rb
index a016b68..a016b68 100644..100755
--- a/spec/unit/puppet/provider/file_line/ruby_spec.rb
+++ b/spec/unit/puppet/provider/file_line/ruby_spec.rb
diff --git a/spec/unit/puppet/type/anchor_spec.rb b/spec/unit/puppet/type/anchor_spec.rb
index f92065f..f92065f 100644..100755
--- a/spec/unit/puppet/type/anchor_spec.rb
+++ b/spec/unit/puppet/type/anchor_spec.rb
diff --git a/spec/unit/puppet/type/file_line_spec.rb b/spec/unit/puppet/type/file_line_spec.rb
index ab5b81b..ab5b81b 100644..100755
--- a/spec/unit/puppet/type/file_line_spec.rb
+++ b/spec/unit/puppet/type/file_line_spec.rb