update todos
This commit is contained in:
@@ -194,3 +194,40 @@ for i in range(10):
|
||||
```
|
||||
```
|
||||
</markdown_spec>
|
||||
|
||||
<test_coverage>
|
||||
## Test Coverage Tracking
|
||||
|
||||
The project uses SimpleCov to track test coverage. Coverage data is stored in `coverage/.resultset.json` after each test run.
|
||||
|
||||
### Coverage Information
|
||||
- **Location**: `coverage/.resultset.json`
|
||||
- **Format**: JSON file with line-by-line coverage data for each Ruby file
|
||||
- **Generated by**: SimpleCov gem (runs automatically with tests)
|
||||
- **HTML Report**: `coverage/index.html` (open in browser for detailed report)
|
||||
|
||||
### Reading Coverage Data
|
||||
|
||||
When checking test coverage:
|
||||
1. Run tests: `bin/rails test`
|
||||
2. Check overall coverage in console output (e.g., "Line Coverage: 85.7% (707 / 825)")
|
||||
3. For detailed per-file coverage: open `coverage/index.html` in a browser
|
||||
4. The `.resultset.json` file contains raw coverage data if programmatic access is needed
|
||||
|
||||
### Coverage Goals
|
||||
- Aim for **80%+ line coverage** for all models and helpers
|
||||
- Controllers should have **all actions tested** (both success and error paths)
|
||||
- Critical business logic should have **100% coverage**
|
||||
|
||||
### Files Excluded from Coverage
|
||||
- `config/` - Configuration files
|
||||
- `db/` - Database migrations and schema
|
||||
- `test/` - Test files themselves
|
||||
- `vendor/` - Third-party code
|
||||
|
||||
### Coverage Notes for Agents
|
||||
- Always run tests after making changes to verify coverage isn't decreasing
|
||||
- If adding new methods/classes, add corresponding tests
|
||||
- Coverage report shows which lines are NOT covered (highlighted in red in HTML report)
|
||||
- Missing coverage often indicates edge cases or error paths not tested
|
||||
</test_coverage>
|
||||
|
||||
Reference in New Issue
Block a user