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.
Learn Ruby on Rails Testing
Welcome to CodeWithJason.com. Here you can learn about Ruby on Rails testing.
Through my articles, videos and podcast episodes can discover how to become competent with technologies like RSpec, Capybara, FactoryBot, and others.
I also cover common testing questions like what to test, how to write tests, the different types of tests in Rails, and many others.
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.