RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model xTesting 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)
MiniTest with Rails
Episode #327Feb 21, 201277 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 #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)
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)
Extracting a Ruby Gem
Episode #301Nov 21, 201140 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 #186Nov 02, 200967 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 #155Mar 30, 2009107 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)