Skip to content

v0.8.2 — Factory: extract when shared across Tests

Choose a tag to compare

@stepan-romankov stepan-romankov released this 24 Apr 12:09
· 8 commits to master since this release
7acd7ff

Skill documentation refinement for the Claude Code samurai skill (no framework code changes).

Change

Relaxed the strict "always inline the factory closure" rule:

  • Prefer inlining the factory inside `RunWith`
  • Extract to a private helper (below the Tests) when 2+ Test functions in the same file need identical factory logic — duplication outweighs locality once there is no single caller

Why

Multi-Test files (e.g. 5 `TestXxx` sharing one factory) turned strict inlining into mandatory 5× duplication. The locality rationale only applies when there is a single caller.

Full Changelog: v0.8.1...v0.8.2