Method: Soaspec::SoapHandler#include_key?

Defined in:
lib/soaspec/exchange_handlers/soap_handler.rb

#include_key?(response, expected) ⇒ Boolean

Returns Whether response body contains expected key.

Parameters:

  • expected (Symbol)

Returns:

  • (Boolean)

    Whether response body contains expected key



141
142
143
144
145
# File 'lib/soaspec/exchange_handlers/soap_handler.rb', line 141

def include_key?(response, expected)
  body = response.body
  body.extend Hashie::Extensions::DeepFind
  !body.deep_find_all(expected).empty?
end