RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rspec xPro Episodes 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)
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)
Presenters from Scratch
Episode #287 – Oct 03, 2011 – 122 comments

Presenters from Scratch

Clean up complex view logic with the help of presenters, and doing this from scratch gives you a lot of flexibility. Here I show not only how to create presenters, but how to test them using Test Unit and RSpec. (14 minutes)
Authorization from Scratch Part 2
Episode #386 – Oct 11, 2012 – 97 comments

Authorization from Scratch Part 2

This finishes the series on building authorization from scratch by refactoring the permission logic into a DSL, restricting authorization with attributes, and combining with strong_parameters to protect params. (20 minutes)
Testing JavaScript with PhantomJS
Episode #391 – Nov 07, 2012 – 84 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)
Authorization from Scratch Part 1
Episode #385 – Oct 07, 2012 – 82 comments

Authorization from Scratch Part 1

Authorization can be difficult to implement and test because it often involves complex logic that exists throughout the entire app. Here I demonstrate how to test and implement authorization from scratch. (15 minutes)
Testing with VCR
Episode #291 – Oct 17, 2011 – 53 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)