class Rack::Test::Cookie

def to_h

A hash of cookie options, including the cookie value, but excluding the cookie name.
def to_h
  hash = @options.merge(
    'value'    => @value,
    'HttpOnly' => http_only?,
    'secure'   => secure?
  )
  hash.delete('httponly')
  hash
end