Method: Rack::Test::Methods#rack_mock_session
- Defined in:
- lib/rack/test/methods.rb
#rack_mock_session ⇒ Object
Return the existing session with the given name, or a new rack session. Always use a new session if name is nil. For backwards compatibility with older rack-test versions.
37 38 39 40 41 42 |
# File 'lib/rack/test/methods.rb', line 37 def rack_test_session(name = :default) # :nodoc: return build_rack_test_session(name) unless name @_rack_test_sessions ||= {} @_rack_test_sessions[name] ||= build_rack_test_session(name) end |