geemus/excon — pull request #336 by burns (2013-11-26 23:51:20+00:00)
Title: Test updates

Using `Bundler.require` was somehow causing openssl to be loaded twice with jruby.
This eliminates all the `constant already defined` errors.

The last commit is from my debugging, but leaving this in might be useful.
One benefit of running in `:production` is that the `showexceptions` middleware isn't used,
which makes test error messages almost impossible to read. Now those response bodies
will only contain the simplified "Internal Server Error" page.

I did determine that all the intermittent errors we've seen are due to the
`can't add a new key into hash during iteration` error from WEBrick.
This was fixed in the 2.0 stdlib, but not backported.
https://github.com/ruby/ruby/commit/3c491a92f6fbfecc065f7687c51c7d6d52a38883
https://github.com/ruby/ruby/commit/7b18633804c606e8bcccfbb44e7d7b795e777ea6
rbx-2.x and jruby in 2.0 mode both have these commits as well.

jruby is the most problematic, but I don't know if we could/should run it with 2.0 compatibility in the tests.
Do you want to look into using a different server?
While I think we could replace all test servers with an EM server, I haven't looked into the SSL tests.
And I think there's still value in being able to use sinatra/rack in some tests.