Class: Authlogic::TestCase::MockCookieJar
- Inherits:
-
Hash
- Object
- Hash
- Authlogic::TestCase::MockCookieJar
show all
- Defined in:
- lib/authlogic/test_case/mock_cookie_jar.rb
Overview
A mock of ‘ActionDispatch::Cookies::CookieJar`.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#set_cookies ⇒ Object
7
8
9
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 7
def set_cookies
@set_cookies
end
|
Instance Method Details
#[](key) ⇒ Object
9
10
11
12
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 9
def [](key)
hash = super
hash && hash[:value]
end
|
#[]=(key, options) ⇒ Object
14
15
16
17
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 14
def []=(key, options)
(@set_cookies ||= {})[key.to_s] = options
super
end
|
#delete(key, _options = {}) ⇒ Object
19
20
21
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 19
def delete(key, _options = {})
super(key)
end
|
#encrypted ⇒ Object
27
28
29
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 27
def encrypted
@encrypted ||= MockEncryptedCookieJar.new(self)
end
|
#signed ⇒ Object
23
24
25
|
# File 'lib/authlogic/test_case/mock_cookie_jar.rb', line 23
def signed
@signed ||= MockSignedCookieJar.new(self)
end
|