Skip to content

Instantly share code, notes, and snippets.

@gma
Created December 16, 2008 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gma/36627 to your computer and use it in GitHub Desktop.
Save gma/36627 to your computer and use it in GitHub Desktop.
module SpecHelper
def session_data
cookies = @response.headers["Set-Cookie"]
serialised = Rack::Utils::parse_query(cookies)["rack.session"]
Marshal.load(serialised.unpack('m*').first)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment