Main Content

JavaScript Testing in Rails: Fast, Headless, In-Browser. Pick Any Three.

About the Talk

May 5, 2009 9:50 AM

Las Vegas, NV

Las Vegas, NV

You wouldn’t consider developing a Rails application without having a solid test suite for your Ruby code, but you’ve somehow convinced yourself to cross your fingers and look the other way when it comes to JavaScript. It doesn’t have to be that way. In this session, you’ll learn how to apply test-driven and behavior-driven development to your unobtrusive JavaScript code in a Rails-friendly manner.

Historically, when selecting a JavaScript testing solution, you were forced to choose whether you wanted a framework that could run your tests in the browser or one that could only run your tests in a headless fashion. With the right combination of tools [1], you can enjoy the best of both worlds: fast, automation-friendly, and headless testing plus the ability to run your tests in whichever browser is acting up on any given day.

In this session, you’ll learn how to give your JavaScript code the testing love it deserves. We’ll tackle:

Choosing and configuring a JavaScript testing framework Writing RSpec-style specifications for test-first JavaScript development Adding jQuery, Prototype, or other libraries to the mix Coding in true red-green-refactor fashion with TextMate Running tests in the browser Running JavaScript tests headlessly with Rake Automating your tests with Continuous Integration

[1] http://github.com/relevance/blue-ridge/

Ratings and Recommendations

This Talk hasn't been rated yet. Sign In to rate Talks.

comments powered by Disqus