write-tests

Installation
SKILL.md

Write Tests

Apply the execution contract before this procedure.

Use this skill when the task is to write, review, or clean up RSpec tests.

Quick Reference

Aspect Rule
Spec types Model: domain logic / pure domain → start here; Request: HTTP endpoints; Job: background processing; Service/PORO: clean Ruby; System: E2E cross-layer journey (sparingly)
Assertions Test behavior, not implementation
Factories Minimal attributes; traits for options; prefer build/build_stubbed over create
Mocking Stub external boundaries at class level (e.g. allow(Client).to receive); no Active Record mocking
Service specs Required: describe '.call' and subject(:result) (see assets/output_checklist.md)
let vs let! Default to let; use let! only when object must exist before action
Example names Present tense; no should; no and (see assets/output_checklist.md)

HARD-GATE

Installs
35
GitHub Stars
26
First Seen
Jul 15, 2026
write-tests — igmarin/rails-agent-skills