Run RSpec tests with smart filtering by file, line, tag, or pattern
Executes RSpec tests with intelligent filtering by file, line, tag, or pattern.
/plugin marketplace add bastos/ruby-plugin-marketplace/plugin install rspec@ruby-plugin-marketplace[file:line | tag | pattern]Execute RSpec tests with intelligent filtering and output formatting.
The user may provide:
spec/models/user_spec.rbspec/models/user_spec.rb:42:focus, :slow, type:modeluser, authenticationRun the specific file or file:line:
bundle exec rspec spec/models/user_spec.rb
bundle exec rspec spec/models/user_spec.rb:42
Run specs matching the tag:
bundle exec rspec --tag focus
bundle exec rspec --tag type:model
bundle exec rspec --tag ~slow # exclude slow
Find and run matching spec files:
bundle exec rspec --pattern "**/user*_spec.rb"
If in a spec file context, run that file. Otherwise, run the full suite or ask user preference.
--format documentation for readable output--format progress for large suites--profile 5 for slow tests when suite > 20 specs--only-failures hintSuggest these when relevant:
--fail-fast - Stop on first failure--seed 12345 - Reproduce random order--bisect - Find minimal failing set--next-failure - Run next pending failure/rspec:run # Run all or contextual
/rspec:run spec/models/ # Run all model specs
/rspec:run user_spec.rb:25 # Run specific line
/rspec:run :focus # Run focused tests
/rspec:run --tag slow # Run slow tagged tests