RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

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.


When it became clear Coach Factory Online about midnight that President Barack Obama was safely on Louis Vuitton Belt the way to re-election, a handful of cranky and Coach Outlet Store inebriated Republican donors wandered about Gucci Belt Romney's election night headquarters, angrily demanding that the Coach Factory Outlet Online giant television screens inside the ballroom be switched from CNN Coach Factory Store to Fox News, where Republican strategist Karl Rove was Coach Factory Online making frantic, face-saving pronouncements about Coach Factory Outlet how Ohio was not yet lost.But the signs of Coach Outlet Online desperation inside the Boston Convention and Coach Bags Outlet Exhibition Center on Tuesday night were symptomatic of a Republican Party Coach Factory Online now standing at a crossroads, with not much track in sight.Romney lost Coach Factory Outlet Online embarrassingly among young people, African-Americans and Hispanics, a brutal Coach Outlet Online reminder for Republicans that their party is ideologically out of tune with Coach Factory Outlet fast-growing segments of the population.Obama crushed Romney among Hispanic Hermes Belt voters by a whopping 44 points, a margin of victory that Coach Factory Online likely propelled the president to victories in Nevada, Colorado and possibly Florida.yaya - November 09, 2012 01:27

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!