redding/deas — pull request #115 by kellyredding (2013-11-26 16:48:00+00:00)
Title: force params hashes with string-only keys

This updates the sinatra runner to have it normalize its incoming
params hash that it gets from Sinatra. Right now all this normalization
does is force all params keys to be strings.

The reason for adding this is rack imposes no standard. So typically
hash keys come in as strings but, for example, the nested hash data
for a multipart uploaded file has symbol keys. This is inconsistent
and can cause testing headaches. Sinatra tries to "help" by making
their params "indifferent" in that you can access any string keys
with their symbol equivalent. However this fixes a symptom more
than the actual problem. The problem is that params keys should
have consistent formats all the way down. This forces that and
strings (as opposed to symbols) are chosen as they can more easily
represent varying values and this is the default for how params
come in with Rack.

So, in summary, both in the test runner and sinatra runner, all
incoming params are keyed using strings and should be accessed as
such. This ensures params handling in handlers is consistent in
both live and test scenarios.

@jcredding ready for review.