Created
October 13, 2014 02:54
-
-
Save mizutaki/394b09284f584e049f7f to your computer and use it in GitHub Desktop.
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
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