# RSpec

> Behaviour-driven testing framework for Ruby

Source: https://talira.ai/catalog/rspec-87n8pes2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Framework, Library, Command-line tool
- Categories: [developer tools / testing / frameworks](https://talira.ai/categories/developer-tools/testing/frameworks), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Platforms: linux, macos, windows
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Plugins: yes
- Backed by: [RSpec](https://talira.ai/orgs/rspec.md)
- Creator: Steven Baker, who started it in 2005; Jon Rowe is the lead maintainer
- Funding: funded by donations[^1]
- Sponsors: Evil Martians, Velocity Labs

RSpec is a testing framework for Ruby in which tests read like specifications: you describe an object and say what it should do with `describe`, `context` and `it`. It is split into gems: rspec-core runs examples and provides the `rspec` command with filtering and formatters, rspec-expectations gives readable matchers, rspec-mocks provides test doubles, stubs and message expectations, and rspec-support holds shared helpers. rspec-rails adds model, request, system and other spec types for Rails apps. The core gems now live in one monorepo, rspec/rspec.

## Links

- Website: https://rspec.info
- GitHub: https://github.com/rspec/rspec
- Docs: https://rspec.info/documentation/

## Problems it solves

- write tests for my Ruby code that read like a description of how it should behave
- I need a test framework for a Rails app that covers models, requests and full browser tests
- stub out a payment client in my tests so they don't hit the real API
- check that a method gets called with the right arguments without running it
- run only the one failing test on line 42 instead of the whole suite
- share the same setup between groups of tests without copying it
- make test failures print a clear message about what was expected and what came back
- run my tests in random order to catch ones that depend on each other
- tag slow browser tests so CI can run them separately
- one test framework that runs everything from tiny unit tests to API and browser tests
- practise test-driven development in Ruby
- write my own matcher so assertions read like plain English

## Features

- describe/context/it DSL
- rspec command with line, tag and example filtering
- random ordering with seeds
- custom formatters
- readable matchers and custom matchers
- test doubles, stubs and message expectations
- shared examples and contexts
- hooks (before, after, around)
- Rails spec types via rspec-rails

## Capabilities

- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.70 out of 1.
Signals: maintenance 0.91, adoption 0.42, momentum 0.24, community 1.00, backing 0.90, extensibility 0.40.

- last commit 10 days ago
- 47 commits in the last 90 days
- 126 GitHub stars
- 679 contributors
- accepts sponsorship (Github, Open Collective, Tidelift)
- has a company behind it
- created by Steven Baker, who started it in 2005; Jon Rowe is the lead maintainer
- funding: funded by donations
- sponsored by Evil Martians, Velocity Labs
- has a plugin system

## Alternatives

- [pytest](https://talira.ai/catalog/pytest-5repc51s.md): pytest: helps you write better programs

## Sources

[^1]: https://opencollective.com/rspec (checked 20 Nov 2026)
