Skip to content

Instantly share code, notes, and snippets.

@vangberg
Forked from tannerburson/gist:75506
Created March 8, 2009 00:27
Show Gist options
  • Save vangberg/75513 to your computer and use it in GitHub Desktop.
Save vangberg/75513 to your computer and use it in GitHub Desktop.
Test::Unit::TestCase.send :include, Sinatra::Test
class Waste < Sinatra::Base
get '/' do
puts session[:test]
end
end
describe 'Waste' do
before do
@app = Waste
@app.set :environment, :test
end
it 'should have sessions working' do
get '/', {}, :session => { :test => "test" }
body.should.equal "test"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment