lib/soaspec/matchers.rb in soaspec-0.2.25 vs lib/soaspec/matchers.rb in soaspec-0.2.26

- old
+ new

@@ -79,10 +79,10 @@ # @param [Exchange, RestClient::Response] exchange Object that returns Exchange or is Exchange # @return [Array] List of errors when checking Exchange response is successful def collect_errors(exchange) failure_list = [] - failure_list << "#{exchange.status_code} not valid status code" unless (200..299).cover?(exchange.status_code) + failure_list << "#{exchange.status_code} not valid status code" unless exchange.successful_status_code? exchange.exchange_handler.expected_mandatory_elements.each do |mandatory_element_path| begin exchange[mandatory_element_path] rescue NoElementAtPath => error failure_list << error.message