lib/soaspec/rest_handler.rb in soaspec-0.0.28 vs lib/soaspec/rest_handler.rb in soaspec-0.0.29

- old
+ new

@@ -1,7 +1,7 @@ -require_relative 'tester' +require_relative 'exchange_handler' require_relative 'hash_methods' require_relative 'xpath_not_found' require_relative 'accessors' require 'json' require 'nori' @@ -19,11 +19,11 @@ end end end # Wraps around Savon client defining default values dependent on the soap request - class RestHandler < Tester + class RestHandler < ExchangeHandler extend Soaspec::RestAccessors extend Soaspec::Accessors # Savon client used to make SOAP calls attr_accessor :client @@ -89,9 +89,15 @@ rescue RestClient::ExceptionWithResponse => e response = e.response end Soaspec::SpecLogger.add_to(response) response + end + + # @param [Hash] format Format of expected result. Ignored for this + # @return [Object] Generic body to be displayed in error messages + def response_body(response, format: :hash) + extract_hash response end def include_in_body?(response, expected) response.body.include? expected end \ No newline at end of file