class WebMock::BodyPattern
def matching_body_hashes?(query_parameters, pattern, content_type)
-
(Boolean)
- true if the paramaters match the comparison
Parameters:
-
pattern
(Hash
) -- which contains keys with a string, hash or -
query_parameters
(Hash
) -- typically the result of parsing
def matching_body_hashes?(query_parameters, pattern, content_type) return false unless query_parameters.is_a?(Hash) return false unless query_parameters.keys.sort == pattern.keys.sort query_parameters.all? do |key, actual| expected = pattern[key] matching_values(actual, expected, content_type) end end