Skip to content

Instantly share code, notes, and snippets.

@mizutaki
Created October 13, 2014 02:54
Show Gist options
  • Save mizutaki/394b09284f584e049f7f to your computer and use it in GitHub Desktop.
Save mizutaki/394b09284f584e049f7f to your computer and use it in GitHub Desktop.
require 'sinatra'
helpers do
def assert(condition)
fail "something is terribly broken" unless condition
end
end
get '/' do
p env['PATH_INFO']
p request.path_info
assert env['PATH_INFO'] == request.path_info
final_result = response.finish
assert Array === final_result
assert final_result.length == 3
assert final_result.first == 200
"everything is fine"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment