class ActionController::TestSession
:nodoc:
@store object, which does not exist for the TestSession class.
Methods #destroy and #load! are overridden to avoid calling methods on the
def destroy
def destroy clear end
def dig(*keys)
def dig(*keys) keys = keys.map.with_index { |key, i| i.zero? ? key.to_s : key } @data.dig(*keys) end
def enabled?
def enabled? true end
def exists?
def exists? true end
def fetch(key, *args, &block)
def fetch(key, *args, &block) @data.fetch(key.to_s, *args, &block) end
def id_was
def id_was @id end
def initialize(session = {}, id = Rack::Session::SessionId.new(SecureRandom.hex(16)))
def initialize(session = {}, id = Rack::Session::SessionId.new(SecureRandom.hex(16))) super(nil, nil) @id = id @data = stringify_keys(session) @loaded = true @initially_empty = @data.empty? end
def keys
def keys @data.keys end
def load!
def load! @id end
def values
def values @data.values end