Sha256: 00a944c45efa1eb50bffcb79f1a266d2a56a1f0baf72e962048440238d14916b
Contents?: true
Size: 573 Bytes
Versions: 7
Compression:
Stored size: 573 Bytes
Contents
# Used to persist session data in test mode instead of using cookies. Stores the session # data lazily in a global var, accessible across the testing environment. class TestSessionStore def initialize(session = nil) @session = session end def destroy $challah_test_session = nil end def read if $challah_test_session return $challah_test_session.to_s.split(':') end nil end def save(token, user_id) $challah_test_session = "#{token}:#{user_id}" true end end Challah.options[:storage_class] = TestSessionStore
Version data entries
7 entries across 7 versions & 1 rubygems