Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Working with HttpMock POST
1 Post
Working with HttpMock POST

Does anyone know how you can specify the body of an HttpMock post as well as the body of the response?

I'm trying to test a restful API where the parameters are posted in in the body of the post as XML and the response is XML in the response body.

As far as I can tell, you can only specify one body in a mock object?

mock.http_method(path, request_headers = {}, body = nil, status = 200, response_headers = {})

Thanks, Tom

1 Post
Login to add your message