01 Nov '12, 7pm

Using Capybara to test JavaScript that makes HTTP requests

We've seen lots of Rails app test suites that use WebMock to disable HTTP requests. There is also good tools like VCR and techniques like Fakes available for other HTTP requests made from Ruby. However, modern apps often make HTTP requests to external services from Javascript. We often use services like KISSMetrics, Stripe, Github, LinkedIn, or Facebook from client-side Javascript. When we use a Capybara driver like Capybara Webkit or Poltergeist, those HTTP requests are no longer stubbed. This post shows how to re-use the Ruby Fakes (written in Sinatra) from the Capybara-with-Javascript-driver acceptance test environment.

Full article: http://www.rubyflow.com/items/8432-using-capybara-to-test...

Tweets

Using Capybara to test JavaScript that makes HT...

robots.thoughtbot.com 01 Nov '12, 3pm

Tools like WebMock are great, but when testing JavaScript, it’s a seperate browser process that loads the page, and not yo...

Would you like to test the submission requireme...

gbca.org.au 02 Nov '12, 3am

Over the past 12 months, the Green Star – Performance Technical Working Group (TWG) has been working to develop credit cri...