Sometimes, an application communicates with an external service not via Internet sockets, but via unix sockets:
Excon.get("unix:///ping", socket: "/tmp/unicorn.sock")
To stub requests like this in tests, use Webmock:
stub_request(:get, "http://unix/ping").to_return(status: 200)
Top comments (0)