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:



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

def last_response
  raise Rack::Test::Error.new("No response yet. Request a page first.") unless @last_response
  @last_response
end