I'm testing with cucumber, capybara and rack-test.
I want to send a delete request and then inspect the response.
I've found that the method visit(url)
store the response in the object page
which is a Capybara::Session
.
Now I'm sending the delete request with the method delete url
and then follow_redirect!
. The problem here is that these methods store the response in the object last_response
which is a Rack::MockResponse
.
My web steps are built using the page
object but I can't find the way to send delete request and storing the response in page
.
Any help?
I think you can use the Capybara driver via: