Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
describe "Sinatra::MyHelpers" do
describe "sessions" do
before do
mock_app {
set(:sessions => true)
include Sinatra::MyHelpers
get '/login' do
session[:ok] = "Ok."
end
get '/' do
@ok = session[:ok]
end
}
end
it "should retain things stored in session b/w actions" do
get '/login'
get '/'
@ok.should == "Ok."
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.