You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Reduce slow command specs because repeated `brew` subprocesses were
dominating the profile more than the tested Homebrew behaviour.
- Preserve coverage by moving option and error branches into direct
command-object specs where a full process adds no useful signal.
- Keep shell-specific coverage by folding Bash command checks into one
subprocess harness for each affected Bash path.
- Combine formula and cask happy paths in `fetch`, `outdated` and
`upgrade`, so one process still checks both package types.
- Keep `cmd/install` source, bottle, keg-only and `--HEAD` coverage,
with `--HEAD` separate because the option applies to the whole call.
- Stub expensive `svn`, DMG mount and signal-wait paths so the specs
cover Homebrew decisions without invoking slow external work.
- Restore `brew extract` monkey patches when specs run in-process, so
dependency and formula requirement caches do not leak across examples.
- Document the integration-test limit in `AGENTS.md` so future command
specs bias towards fast in-process coverage.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ When running Ruby directly (e.g. `ruby -e ...`, `gem`, profiling tools), never u
27
27
### Development Flow
28
28
29
29
- Write new code (using Sorbet `sig` type signatures and `typed: strict` for new files).
30
-
- Write new tests (avoid more than one `:integration_test` per command for speed; add another only for essential core functionality in essential non-developer commands). Try `typed: true` as a baseline but revert to `typed: false` if there are not easily fixable errors.
30
+
- Write new tests (use at most one `:integration_test` per command, make it a happy-path test and keep it as fast as possible; add another only for essential core functionality in essential non-developer commands). Try `typed: true` as a baseline but revert to `typed: false` if there are not easily fixable errors.
31
31
Write fast tests by preferring a single `expect` per unit test and combine expectations in a single test when it is an integration test or has non-trivial `before` for test setup.
32
32
- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.
33
33
- Formula classes created in specs may be frozen; avoid stubbing class methods on them with RSpec mocks and prefer instance-level stubs or test setup that does not require class-method stubbing.
0 commit comments