Class: FASTSecurity::DiscoveryGroup

Inherits:
Inferno::TestGroup
  • Object
show all
Includes:
Inferno::DSL::Assertions
Defined in:
lib/fast_security/discovery_group.rb

Instance Method Summary collapse

Instance Method Details

#assert_array_of_strings(config, field) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/fast_security/discovery_group.rb', line 18

def assert_array_of_strings(config, field)
  values = config[field]
  assert values.is_a?(Array),
         "`#{field}` should be an Array, but found #{values.class.name}"
  non_string_values = values.select { |value| !value.is_a?(String) }
  assert non_string_values.blank?,
         "`#{field}` should be an Array of strings, " \
         "but found #{non_string_values.map(&:class).map(&:name).join(', ')}"
end