The confusing parts of Rails testing, clearly explained.
Beginner-friendly lessons on RSpec, Capybara, Factory Bot, testing strategy, and more.
with Rails Testing
Learn the different types of tests and what type of features to write tests for.
Learn how to write tests that simulate clicks and keystrokes in the browser.
Learn the domain-specific language (DSL) in which all RSpec tests are written.
Learn how to conveniently generate data for your tests using this popular library.
Browse Most Popular Articles
A Rails testing "hello world" using RSpec and CapybaraShows the simplest possible example of using RSpec and Capybara in a Rails application.
A repeatable formula for writing Rails integration tests with CapybaraDon't get stumped on test implementation. Follow this repeatable step-by-step formula.
Why I recommend against CucumberCucumber is a popular tool but it doesn't add much value. It mostly just adds noise.
RSpec mocks and stubs in plain EnglishMocks and stubs can be confusing. This article explains what they are and what the difference is.
About the Author
I'm Jason Swett. I'm a prolific blogger on the topic of Ruby on Rails testing, with articles regularly featured in Ruby Weekly. I'm an international conference speaker and the host of the Rails with Jason podcast.