lib/soaspec/exchange_handlers/soap_handler.rb in soaspec-0.1.2 vs lib/soaspec/exchange_handlers/soap_handler.rb in soaspec-0.1.3
- old
+ new
@@ -99,10 +99,10 @@
# @param [Hash] request_parameters Parameters used to overwrite defaults in request
def make_request(request_parameters)
test_values = request_body_params request_parameters
begin
if @request_option == :template
- request_body = File.read('template/' + template_name)
+ request_body = File.read(File.join(Soaspec.template_folder, template_name))
render_body = ERB.new(request_body).result(binding)
client.call(operation, xml: render_body) # Call the SOAP operation with the request XML provided
elsif @request_option == :hash
client.call(operation, message: @default_hash.merge(test_values), attributes: request_root_attributes)
end
\ No newline at end of file