jnicklas/capybara — pull request #1400 by twalpole (2014-09-18 21:44:28+00:00)
Title: Use Rack::Lock to prevent concurrency when eager_load is false

Rails doesn't insert Rack::Lock into the middleware when config.cache_classes is true, even if config.eager_load is false (the default Rails test environment settings). This causes an issue since it allows WEBrick to handle multiple requests at once which can cause concurrency issues around constant loading. See - https://github.com/rails/rails/issues/15089