jnicklas/carrierwave — pull request #1004 by taavo (2013-03-01 14:33:56+00:00)
Title: improve process_uri coverage

I think one of the reasons process_uri has been such a pain in the ass is that our tests have sucked.

Before: Two tests written to test implementation, one test to make sure we treat a specific class of URIs properly.

After: Zero tests to test implementation, four tests to make sure we treat specific classes of URIs properly. Those four classes of URIs being:
* URIs that are already escaped (like #999)
* URIs that need to be escaped (like #773, I think)
* URIs that don't need to be escaped, but look like they need it and would break if they were (e.g. `http://example.com/?foo[]=bar`)
* Invalid URIs (like #1003, I think)

This should at least help process_uri from getting any worse than it already is, as later generations of fools (like myself) attempt to fix the problem.

(I'm indifferent towards all the tests for `class == URI::HTTP`, but it is important we don't just return a string since at least one URI method is called.)