It seems strange that you need this information during the Capybara test. Good practice is to write your user interface tests to reflect the actual behavior of the user.
Consider a button that uses AJAX to update a block of text on a page. You can click the button, then check that the request has been completed and check the return value. But you'd better test it as a user: click the button, wait for the text block to change, and then confirm that it now displays the expected text.
If you really want to capture network traffic, I would install your test transparent HTTP proxy, connect to it and check the request logs after the fact.
My team uses a similar approach to simulate disconnecting from the Internet during Capybara tests. In the Firefox profile that we use, it is configured to point to a transparent proxy server that starts at the beginning of each function. Thus, we can write scripts like:
Given I am online When I do something And I am offline Then something doesn't break
... where the steps am online and am offline just turn proxies on and off.
source share