taf2/curb — pull request #115 by chuyeow (2012-05-10 14:13:23+00:00)
Title: Curl::Multi.http doesn't actually call perform when :max_connects > number of requests

This bug had me stumped when I was writing a Faraday adapter for Curb - I could never get the parallel requests test to pass!

I checked Curb's own tests but the ```tc_curl_multi.rb``` tests were still passing - it was only after I explicitly broke the tests (see e45a3949) and the _tests still passed_ that I realized the callbacks weren't actually being performed, so no assertions were actually run.

I traced the error back to 327e2093, circa Curb 0.7.14 (it's still working on 0.7.14, but not in any versions after that). It's all due to the ```until urls_with_config.empty?``` check (I find ```until``` to be rather confusing).

Fixed the problem, plus added a test that covers the case where ```:max_connects``` < number of requests.

Note: You can leave out the commits I added to break and fix the tests (e45a3949, fdea6ab0) - I left them in for verification.