Module: CommonAssertions
- Extended by:
- Inferno::DSL::Assertions
- Included in:
- UDAPSecurityTestKit
- Defined in:
- lib/udap_security_test_kit/common_assertions.rb
Overview
Module for assertion methods that are used across multiple tests
Class Method Summary collapse
Class Method Details
.assert_array_of_strings(config, field) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/udap_security_test_kit/common_assertions.rb', line 5 def self.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.reject { |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 |