RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: test xRefactoring x
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)
Presenters from Scratch
Episode #287Oct 03, 2011122 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)
Service Objects
Episode #398Dec 18, 2012114 comments

Service Objects

Models can quickly become a grab-bag of unrelated methods if behavior is constantly being pushed from the controller. Here I show how to refactor this using Concerns and Service Objects. (12 minutes)
Refactoring User Name Part 3
Episode #12Mar 30, 200764 comments

Refactoring User Name Part 3

In the final part of this series you will see how to refactor your tests. Keeping tests clean is important because it will make testing easier to do in the future. (4 minutes)
Refactoring User Name Part 2
Episode #11Mar 28, 200737 comments

Refactoring User Name Part 2

Testing and refactoring go hand in hand. Refactoring is all about improving code without changing its behavior. Testing is all about making sure you don't change the behavior while you are improving the code. (6 minutes)