
About RSpec
RSpec is a behavior-driven development tool for Ruby. It lets you describe how code should behave in plain, readable examples.
What it does
You write specs that describe the expected behavior, run them, and then write the code until they pass. RSpec includes a command that sets up a new project, a documentation format for readable output, and failure messages that show the expected and actual values. It keeps its matchers, mocks and core runner in separate gems.
Key features
- Describe blocks that group related examples
- Readable output in a documentation format
- Failure messages with expected and actual values
- Project setup with a single init command
- Mocks, stubs and expectations in separate gems
Who it's for
Ruby developers who prefer to test behavior with readable specs. Teams that practice test-driven development often choose RSpec because the specs read like plain sentences.
Pricing and good to know
RSpec is free and open source under the MIT license. It is distributed as Ruby gems, installed with Bundler or the gem command, and it runs wherever Ruby runs. The site has a contributing guide, a blog, and an upgrade page for new major releases.
Highlights
- Describe blocks group related examples
- Readable output in a documentation format
- Failure messages show expected and actual values
- Project setup with one init command
- Mocks, stubs and expectations in separate gems












