Free Ruby Testing Micro-Course
Sign up and join 700+ other developers learning Ruby on Rails testing. Get free Rails testing tips about once a week.
The story behind CodeWithJason.com
I’m Jason Swett. For years, I was a PHP cowboy coder. I hardly wrote a single test in my life (and it showed in the quality of my work). Then I discovered Ruby on Rails and the value of writing tests for my code.
Testing didn’t come easily at first, especially as I struggled with questions like what to test and how. But once I got the hang of it I never went back to the old way.
Today I write tests for almost all my code and I teach testing at conferences and in classes and workshops all over the world. If you’re trying to learn how to write better tests for your Rails code, I’m here to help.
Recommended starting points
A Rails testing “hello world” using RSpec and Capybara (article + video)
This is a relatively simple example of using RSpec and Capybara to write an integration test.
Using tests as a tool to wrangle legacy projects (article + video)
This article/video describes techniques for tackling the difficulties present in testing legacy code. The article is a variation of a talk I’ve delivered at RubyHACK and RubyConf India.
Interview with Kent Beck (podcast episode)
Kent Beck is the author of the classes Test-Driven Development: By Example. In this episode of The Ruby Testing Podcast Kent and I discuss TDD and how to move forward with writing tests when you get stuck.
All my articles
If you’d like to get at everything I’ve ever written, here you go. Most of the articles are related to Rails testing.