Method: Rack::MockSession#last_response

Defined in:
lib/rack/mock_session.rb

#last_responseObject

Return the last response received in the session. Raises an error if no requests have been sent yet.

Raises:


54
55
56
57
# File 'lib/rack/mock_session.rb', line 54

def last_response
  raise Rack::Test::Error, 'No response yet. Request a page first.' unless @last_response
  @last_response
end