Created
May 31, 2011 08:57
-
-
Save ozgun/1000196 to your computer and use it in GitHub Desktop.
sinatra-testing-with-sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "tests something..." do | |
sess = {'warden.user.user.key' => [User, User.first.id]} | |
encoded = [Marshal.dump(sess)].pack("m*") | |
get "/testing", {}, {'HTTP_COOKIE' => "rack.session=" + encoded} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment