lib/soaspec/exchange_handlers/soap_handler.rb in soaspec-0.0.56 vs lib/soaspec/exchange_handlers/soap_handler.rb in soaspec-0.0.57

- old
+ new

@@ -131,12 +131,15 @@ # @return [Boolean] Whether response includes provided string within it def include_in_body?(response, expected) response.to_xml.to_s.include? expected end + # @param [Symbol] expected # @return [Boolean] Whether response body contains expected key def include_key?(response, expected) - response.body.include_key? expected + body = response.body + body.extend Hashie::Extensions::DeepFind + !body.deep_find_all(expected).empty? end # Returns the value at the provided xpath # @param [Savon::Response] response # @param [String] xpath \ No newline at end of file