Testing Javascript API calls with Capybara and puffing-billy