lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.0.38 vs lib/soaspec/exchange_handlers/rest_handler.rb in soaspec-0.0.39

- old
+ new

@@ -122,11 +122,12 @@ @resource_used.send(test_values[:method].to_s, test_values[:params]) end rescue RestClient::ExceptionWithResponse => e response = e.response end - Soaspec::SpecLogger.add_to(response) + Soaspec::SpecLogger.add_to('response_headers: ' + response.headers.to_s) + Soaspec::SpecLogger.add_to('response_body: ' + response.to_s) response end # @param [Hash] format Format of expected result. Ignored for this # @return [Object] Generic body to be displayed in error messages @@ -203,10 +204,10 @@ def xpath_value_for(exchange: nil, xpath: nil) raise ArgumentError unless exchange && xpath response = exchange.response raise "Can't perform XPATH if response is not XML" unless Interpreter.response_type_for(response) == :xml result = - if Soaspec::Environment.strip_namespaces? && !xpath.include?(':') + if Soaspec.strip_namespaces? && !xpath.include?(':') temp_doc = Nokogiri.parse response.body temp_doc.remove_namespaces! temp_doc.xpath(xpath).first else Nokogiri.parse(response.body).xpath(xpath).first \ No newline at end of file