RailsCasts - Ruby on Rails Screencasts

RailsCasts Pro episodes are now free!

Learn more or hide this

Testing JavaScript with PhantomJS

#391 Testing JavaScript with PhantomJS pro

Nov 07, 2012 | 10 minutes | Testing, Tools, Plugins
PhantomJS allows us to test JavaScript without going through a browser window. Here I show how to do this using Capybara and Poltergeist. I also give some tips on handling database transactions and skipping javascript tests.
Click to Play Video ▶
Tweet
  • Download:
  • source code Project Files in Zip (57 KB)
  • mp4 Full Size H.264 Video (27.3 MB)
  • m4v Smaller H.264 Video (12.3 MB)
  • webm Full Size VP8 Video (13.5 MB)
  • ogv Full Size Theora Video (28.5 MB)
Episode #413Apr 10, 2013200 comments

Fast Tests

A slow test suite can put a damper on test-driven development. In this episode I show a variety of ways to optimize specs including: selective testing, preloading Rails, and testing outside of Rails. (17 minutes)
Episode #412Apr 04, 2013179 comments

Fast Rails Commands

Rails commands, such as generators, migrations, and tests, have a tendency to be slow because they need to load the Rails app each time. Here I show three tools to make this faster: Zeus, Spring, and Commands. (8 minutes)
Episode #411Mar 27, 2013219 comments

Performance Testing

Learn how to add performance tests that automate benchmark and profile reports. Here I show how to find the bottlenecks to optimize a page. I also show how to compile Ruby with gcdata to get information about memory usage. (16 minutes)
Episode #408Mar 04, 2013161 comments

Ember Part 1

Ember.js is a javascript framework for making rich client-side applications. In the first part of this two part series I show how to setup templates, controllers, and routes. (15 minutes)
Episode #148Feb 03, 2013100 comments

Custom App Generators (revised)

Learn how to customize the Rails app generator to fit your preference. This episode shows how to do this using .railsrc file, app templates, app builders, RailsWizard, and AppScrolls. (10 minutes)
loading

AltStyle によって変換されたページ (->オリジナル) /