Sinatra::Test#param_string was slurped from merb: <http://github.com/wycats/merb/blob/84f61f39/merb-core/lib/merb-core/dispatch/request_parsers.rb#L156>
The "spec" task has been removed and Rake's built in test helper is used to run specs now so we should be able to test with multiple installed versions of Ruby.
fix for "warning: The :env option is deprecated; use :environment instead."
Before this, we continued processing other before blocks and routes after a before block threw :halt.
1. Don't add the sinatra lib dir to $: on each reload. 2. Don't remove sinatra.rb from $LOADED_FEATURES unless we're reloading.
Sinatra will now load you in-file-templates from the file that required sinatra. If you need to use in-file-templates outside this you will need to explicitly call use_in_file_templates! in that file.
I think this ended ended up being a much cleaner implementation, anyway.
This is based largely on manveru's example implementation: http://paste.linuxhelp.tv/pastes/view/15309 NOTE: we should plan on ripping this out once nested params makes it into Rack.
Works around an issue introduced in Rack 0.9.0 with request body params not being parsed when the request method is PUT. This should be reverted once a fix lands in Rack. Ticket for Rack fix: http://rack.lighthouseapp.com/projects/22435-rack/tickets/20 More: http://sinatra.lighthouseapp.com/projects/9779/tickets/72
I changed the ".should." style to use "fail" when we converted to test/unit style but I'd rather use asserts here.