mperham/sidekiq — pull request #1768 by charliesome (2014-06-08 03:49:02+00:00)
Title: Fix TestFetcher redis connection

I have my Redis running on a non-standard port. Most Sidekiq tests will work properly with this if I pass the right connection details in the `REDIS_URL` environment variables. TestFetcher however implicitly tries connection to Redis on the default port.

I've fixed TestFetcher up to use the same Redis URL as all the other tests. Doing this exposed an order dependency with TestRedisConnection, which writes all over environment variables and does not restore the previous values. I've fixed this by making a copy of ENV before each test and restoring after each test.