lib/soaspec/exchange.rb in soaspec-0.0.6 vs lib/soaspec/exchange.rb in soaspec-0.0.7
- old
+ new
@@ -19,29 +19,33 @@
end
# Name describing this class when used with `RSpec.describe`
# @return [String] Name given when initializing
def to_s
- @response = self.make_request
+ @response = make_request
if Soaspec::Environment.api_handler.class < Soaspec::BasicSoapHandler
@xml_response = @response.to_xml
@xml_doc = @response.doc
end
@test_name
end
def contain(value)
@xml_response.include? value
end
-
+
+ def mandatory_elements
+ Soaspec::Environment.api_handler.mandatory_elements
+ end
+
# Returns Savon response
# response.body (body of response as Hash)
# response.header (head of response as Hash)
def response
@response
end
def status_code
- @response.http.code
+ Soaspec::Environment.api_handler.status_code_for(@response)
end
end
\ No newline at end of file