Analyze test coverage and identify untested code
Analyzes test coverage and identifies untested code with actionable recommendations.
/plugin marketplace add bastos/claude-code-plugin-marketplace/plugin install bastos-rspec-plugins-rspec@bastos/claude-code-plugin-marketplace[file or directory]Identify gaps in test coverage and suggest specs to write.
Look for SimpleCov in the project:
# spec/spec_helper.rb or spec/rails_helper.rb
require 'simplecov'
SimpleCov.start 'rails'
If not present, suggest adding it.
COVERAGE=true bundle exec rspec
open coverage/index.html
Parse coverage output to identify:
Provide actionable report:
## Coverage Analysis
### Missing Specs (No spec file exists)
- app/services/notification_service.rb
- app/models/concerns/auditable.rb
### Low Coverage (< 80%)
- app/models/order.rb (65%)
- Missing: #calculate_tax, #apply_discount
- app/services/payment_processor.rb (45%)
- Missing: error handling paths
### Suggested Priority
1. OrderProcessor - critical business logic
2. PaymentProcessor - handles money
3. NotificationService - user-facing
When reporting coverage gaps:
/rspec:coverage # Full project analysis
/rspec:coverage app/models/ # Models coverage
/rspec:coverage app/models/user.rb # Single file coverage