RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: testing x
Fast Tests
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)
Performance Testing
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)
Testing JavaScript with PhantomJS
Episode #391Nov 07, 201284 comments

Testing JavaScript with PhantomJS

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. (10 minutes)
Testing JavaScript with Jasmine (revised)
Episode #261Jun 28, 201266 comments

Testing JavaScript with Jasmine (revised)

The jasminerice gem makes it easy to test your JavaScript with Jasmine in a Rails application. Here I also cover jasmine-jquery and guard-jasmine. (11 minutes)
A/B Testing with Split
Episode #331Mar 07, 201257 comments

A/B Testing with Split

Split testing allows you to experiment with different designs and track conversions to determine which one is the most effective. Learn how to do A/B testing using Split in this episode. (10 minutes)
How I Test
Episode #275Jul 18, 2011137 comments

How I Test

Here I show how I would add tests to the password reset feature created in the previous episode. I use RSpec, Capybara, Factory Girl, and Guard to make request, model, and mailer specs. (15 minutes)
Testing with VCR
Episode #291Oct 17, 201153 comments

Testing with VCR

If you ever need to test an application which communicates with an external API, VCR is the way to go. Here I show a workflow in RSpec, how to use with capybara-mechanize, how to add sanitization filtering, and more. (13 minutes)
Fast Rails Commands
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)
Testing Time & Web Requests
Episode #276Jul 25, 201150 comments

Testing Time & Web Requests

It can be difficult to test code that deals with the current time or an external web request. Here I show you how to do both using the Timecop and FakeWeb gems. (8 minutes)
Site-Wide Announcements (revised)
Episode #103Nov 12, 201295 comments

Site-Wide Announcements (revised)

Here I show how to add an announcement message at the top of every page in the application and allow the user to permanently hide it. This is all done test-first and even includes testing the JavaScript behavior. (11 minutes)