lib/soaspec/basic_soap_handler.rb in soaspec-0.0.22 vs lib/soaspec/basic_soap_handler.rb in soaspec-0.0.23
- old
+ new
@@ -102,10 +102,14 @@
# @return [Hash] Hash of 'xpath' => 'expected value' pairs
def mandatory_xpath_values
{}
end
+ def include_in_body?(response, expected)
+ response.to_xml.to_s.include? expected
+ end
+
# Attributes set at the root XML element of SOAP request
def root_attributes
nil
end
@@ -115,10 +119,9 @@
if Soaspec::Environment.strip_namespaces? && !param[:xpath].include?(':')
temp_doc = param[:exchange].response.doc
temp_doc.remove_namespaces!
temp_doc.xpath(param[:xpath]).first
else
- puts 'no strip' + param[:xpath]
param[:exchange].response.xpath(param[:xpath]).first
end
raise NoElementAtXpath, "No value at Xpath '#{param[:xpath]}'" unless result
result.inner_text
end
\ No newline at end of file