RailsCasts Episode #391: Testing JavaScript with PhantomJS http://railscasts.com/episodes/391-testing-javascript-with-phantomjs Requires Ruby 1.9.2 or higher. Commands used in this episode brew install phantomjs phantomjs try_phantom.coffee rake spec rspec . --tag '~js'