class Global

Overview

Extend Global class with session storage. This allows the session to be shared between with_session and the HTTP helper methods (get, post, etc.)

Defined in:

spec-kemal.cr
spec-kemal/session.cr

Class Method Summary

Class Method Detail

def self.response #

Returns the response from the last request


[View source]
def self.response=(response : Nil | HTTP::Client::Response) #

Sets the response from the last request


[View source]
def self.session=(session : Kemal::Session | Nil) #

The current test session, if any. When set, all HTTP requests will include this session's cookie.


[View source]
def self.session? : Kemal::Session | Nil #

The current test session, if any. When set, all HTTP requests will include this session's cookie.


[View source]