summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2025-12-09 16:33:02 -0800
committerJesse Vincent <jesse@fsck.com>2025-12-17 16:44:51 -0800
commit718ec45d33584e7d6f660c8bd75d62989dc40eb2 (patch)
treef7f66b6913a675cf66d7c61664a6e998ea3f767e
parentc7caee56478a98cb7ab848076c93fc21f7e972e8 (diff)
Integrate testing-anti-patterns into test-driven-development
- Moved testing-anti-patterns to test-driven-development/testing-anti-patterns.md - Added reference in TDD skill for progressive disclosure - Updated README to reflect consolidation - Removed standalone skill (now a supporting reference)
-rw-r--r--README.md3
-rw-r--r--skills/test-driven-development/SKILL.md7
-rw-r--r--skills/test-driven-development/testing-anti-patterns.md (renamed from skills/testing-anti-patterns/SKILL.md)7
3 files changed, 10 insertions, 7 deletions
diff --git a/README.md b/README.md
index 98436c9..c0223c2 100644
--- a/README.md
+++ b/README.md
@@ -100,9 +100,8 @@ Fetch and follow instructions from https://raw.githubusercontent.com/obra/superp
### Skills Library
**Testing**
-- **test-driven-development** - RED-GREEN-REFACTOR cycle
+- **test-driven-development** - RED-GREEN-REFACTOR cycle (includes anti-patterns reference)
- **condition-based-waiting** - Async test patterns
-- **testing-anti-patterns** - Common pitfalls to avoid
**Debugging**
- **systematic-debugging** - 4-phase root cause process
diff --git a/skills/test-driven-development/SKILL.md b/skills/test-driven-development/SKILL.md
index fa8004b..b138985 100644
--- a/skills/test-driven-development/SKILL.md
+++ b/skills/test-driven-development/SKILL.md
@@ -354,6 +354,13 @@ Bug found? Write failing test reproducing it. Follow TDD cycle. Test proves fix
Never fix bugs without a test.
+## Testing Anti-Patterns
+
+When adding mocks or test utilities, read @testing-anti-patterns.md to avoid common pitfalls:
+- Testing mock behavior instead of real behavior
+- Adding test-only methods to production classes
+- Mocking without understanding dependencies
+
## Final Rule
```
diff --git a/skills/testing-anti-patterns/SKILL.md b/skills/test-driven-development/testing-anti-patterns.md
index acf3a98..e77ab6b 100644
--- a/skills/testing-anti-patterns/SKILL.md
+++ b/skills/test-driven-development/testing-anti-patterns.md
@@ -1,10 +1,7 @@
----
-name: testing-anti-patterns
-description: Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
----
-
# Testing Anti-Patterns
+**Load this reference when:** writing or changing tests, adding mocks, or tempted to add test-only methods to production code.
+
## Overview
Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested.