Skip to content

Instantly share code, notes, and snippets.

@mattly
Created May 17, 2009 08:12
Show Gist options
  • Save mattly/112960 to your computer and use it in GitHub Desktop.
Save mattly/112960 to your computer and use it in GitHub Desktop.
describe MyApp do
include Sinatra::Test
before do
@app = MyApp
setup_site
setup_user
end
describe "when logged in" do
before do
# debugger;
get('/secret', {}, :session => {:user_id => @user.id})
end
test "it doesn't redirect to login" do
response.status.must_equal 200
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment