rspec
TLDR
Run all specs
SYNOPSIS
rspec [--format fmt] [--tag tag] [options] [files]
DESCRIPTION
rspec is Ruby's behavior-driven testing framework. It provides readable test syntax.
Spec files describe expected behavior. Examples verify code meets expectations.
Matchers provide expressive assertions. Should, expect, and various comparison methods.
Tags organize and filter tests. Focus on specific categories or skip slow tests.
Failure tracking enables running only failed tests. Speeds up debugging cycles.
Formatters output results in various styles. Documentation format shows nested describe blocks.
PARAMETERS
--format FORMAT
Output format.--tag TAG
Run tagged examples.--only-failures
Run previously failed.--order ORDER
Execution order.--fail-fast
Stop on first failure.--profile N
Show slowest examples.--dry-run
Show without running.-e, --example PATTERN
Match example name.
CAVEATS
Requires rspec gem. Rails apps use rspec-rails. Large suites may be slow.
HISTORY
RSpec was created by Steven Baker and David Chelimsky around 2005. It pioneered BDD-style testing in Ruby and influenced testing frameworks in other languages.


