RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model xTesting x
Fast Tests
Episode #413 – Apr 10, 2013 – 200 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)
MiniTest with Rails
Episode #327 – Feb 21, 2012 – 77 comments

MiniTest with Rails

MiniTest is a fast and lightweight testing library. Here you will learn how to use it in a Rails app for model, helper, and integration testing. The Turn gem is also demonstrated for prettier test output. (15 minutes)
Site-Wide Announcements (revised)
Episode #103 – Nov 12, 2012 – 95 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)
How I Test
Episode #275 – Jul 18, 2011 – 137 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)
Extracting a Ruby Gem
Episode #301 – Nov 21, 2011 – 40 comments

Extracting a Ruby Gem

In this episode I show how to extract a Ruby Gem from an existing Rails application, test it with RSpec and Supermodel, and add a Railtie. (16 minutes)
Pickle with Cucumber
Episode #186 – Nov 02, 2009 – 67 comments

Pickle with Cucumber

Pickle adds many convenient Cucumber steps for generating models. Also learn about table diffs in this episode. (16 minutes)
Beginning with Cucumber
Episode #155 – Mar 30, 2009 – 107 comments

Beginning with Cucumber

Cucumber is a high-level testing framework. In this episode we will create a new Rails application from scratch using behavior driven development. (15 minutes)