RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: Testing x
Factories not Fixtures
Episode #158 – Apr 20, 2009 – 67 comments

Factories not Fixtures

Fixtures are external dependencies which can make tests brittle and difficult to read. In this episode I show a better alternative using factories to generate the needed records. (12 minutes)
RSpec Matchers & Macros
Episode #157 – Apr 13, 2009 – 40 comments

RSpec Matchers & Macros

You can improve the readability and remove duplication in RSpec by adding matchers and macros. Learn how in this episode. (18 minutes)
Webrat
Episode #156 – Apr 06, 2009 – 60 comments

Webrat

If you prefer writing integration tests in ruby instead of Cucumber's plain english, consider interacting with Webrat directly as I show in this episode. (7 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)
Selenium
Episode #116 – Jun 30, 2008 – 64 comments

Selenium

Selenium is a great way to test your app automatically through a browser. See how it works in this episode. (9 minutes)
Fixtures in Rails 2.0
Episode #81 – Nov 25, 2007 – 51 comments

Fixtures in Rails 2.0

In Rails 2.0, fixtures see many improvements which makes them much easier to manage. Watch this episode for details. (4 minutes)
Testing Controllers with RSpec
Episode #71 – Sep 17, 2007 – 59 comments

Testing Controllers with RSpec

Controllers are tricky to test, and there's no perfect way to do it. In this episode you will see how I test controllers, and my reasoning behind it. (11 minutes)
Testing without Fixtures
Episode #60 – Jul 20, 2007 – 49 comments

Testing without Fixtures

Tests which rely heavily on fixtures are brittle and can be difficult to maintain. This episode will show a couple techniques for creating tests which don't use fixtures. (9 minutes)
Refactoring User Name Part 3
Episode #12 – Mar 30, 2007 – 64 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 #11 – Mar 28, 2007 – 37 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)