Skip to content
testcritic

RSpec

Ruby's behaviour-driven testing framework with an exceptionally readable DSL.

Unit & ComponentOpen sourceSelf-hostable
Visit RSpec

What it is

RSpec structures tests as nested describe/context blocks with expectation syntax that reads close to English, plus doubles, stubs and shared examples. It is the default testing tool in most Ruby and Rails codebases and its conventions shape how Ruby teams think about testing.

Best for

Ruby and Rails applications.

Where it is strong

  • The output reads as documentation of intended behaviour.
  • Shared examples and contexts keep large Rails suites organised.
  • Deep integration with the Rails ecosystem — Capybara, FactoryBot, VCR.

Where it falls short

  • Deeply nested contexts with let and before hooks become very hard to follow.
  • The DSL is a language of its own to learn.
  • Rails suites tend towards slowness; expect to invest in parallelisation.

Pricing

Free and open source

Open source

Free tier: Everything, self-hosted

What drives the bill: Free and open source. You pay in engineering time and CI minutes.

Check current pricing on RSpec Team’s site

Figures are indicative and were last reviewed August 2026. Vendors change pricing often; confirm before you commit.

Works with

RailsCapybaraFactoryBotSimpleCovGitHub Actions

What people who use RSpec say

No reviews of RSpec yet. If you have used it in anger, yours would be the first.