puppetlabs-stdlib/spec/functions
Mark Chappell e2d7f3bb89 (MODULES-707) chomp() fails because generate() no longer returns a string
We need to use

  unless value.is_a?(String) || value.is_a?(Array)

rather than

  klass = value.class
  unless [String, Array].include?(klass)

because the klass version enforces type checking which is too strict, and does
not allow us to accept objects wich have extended String (or Array).

For example, generate() function now returns Puppet::Util::Execution::ProcessOutput
which is just a very simple extension of String.  While this in it's self was
not intentional (PUP-2306) it is not unreasonable to cope with objects which
extend Strings
2014-09-22 19:49:50 +02:00
..
abs_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
any2array_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
base64_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
bool2num_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
capitalize_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
chomp_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
chop_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
concat_spec.rb Introduce test for array destruction 2014-07-31 11:23:34 -07:00
count_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
deep_merge_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
defined_with_params_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
delete_at_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
delete_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
delete_undef_values_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
delete_values_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
difference_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
dirname_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
downcase_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
empty_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
ensure_packages_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
ensure_resource_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
flatten_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
floor_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
fqdn_rotate_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
get_module_path_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
getparam_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
getvar_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
grep_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
has_interface_with_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
has_ip_address_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
has_ip_network_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
has_key_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
hash_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
intersection_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_array_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_bool_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_domain_name_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_float_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_function_available.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_hash_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_integer_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_ip_address_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_mac_address_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_numeric_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
is_string_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
join_keys_to_values_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
join_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
keys_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
loadyaml_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
lstrip_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
max_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
member_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
merge_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
min_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
num2bool_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
parsejson_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
parseyaml_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
pick_default_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
pick_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
prefix_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
private_spec.rb Add private() function 2014-06-11 16:35:32 +02:00
range_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
reject_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
reverse_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
rstrip_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
shuffle_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
size_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
sort_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
squeeze_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
str2bool_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
str2saltedsha512_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
strftime_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
strip_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
suffix_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
swapcase_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
time_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
to_bytes_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
type_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
union_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
unique_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
upcase_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
uriescape_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00
validate_absolute_path_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_array_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_augeas_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_bool_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_cmd_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_hash_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_ipv4_address_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_ipv6_address_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_re_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
validate_slength_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
validate_string_spec.rb Move unit tests to spec/functions 2014-05-08 10:47:24 -07:00
values_at_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
values_spec.rb Convert specs to RSpec 2.99.0 syntax with Transpec 2014-06-04 14:38:37 -04:00
zip_spec.rb (MODULES-707) chomp() fails because generate() no longer returns a string 2014-09-22 19:49:50 +02:00