lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.3.10 vs lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.3.11
- old
+ new
@@ -201,10 +201,10 @@
when :xml, :html
result = xpath_elements_for(response: response, xpath: path, attribute: attribute).first
raise NoElementAtPath, "No value at Xpath '#{prefix_xpath(path, attribute)}' in '#{response.body}'" unless result
return result.inner_text if attribute.nil?
- return result.attributes[attribute].inner_text
+ result.attributes[attribute].inner_text
when :json
matching_values = calculated_json_path_matches(path, response, attribute, not_empty: true)
matching_values.first
else # Assume this is a String
raise NoElementAtPath, 'Response is empty' if response.to_s.empty?