It feels weird to me to make a live HTTP request out to a (we hope) bad URL in every test environment. Could you WebMock it instead, a la the cal1card/proxy_spec?

stub_request(:any, /.*#{cal1card_uri.hostname}.*/).to_raise(Errno::ECONNREFUSED)