Test Slice

Test a Hanami slice in isolation — write the test first to verify it fails for the right reason, load only the slice under test with `:slice` RSpec metadata tag, mock cross-slice dependencies, never reach into another slice's internals, a slice test must NOT depend on another slice booting, test the public interface through action specs with stubbed operations, operation specs with test doubles through constructor, repository specs against a test database, and integration specs across the full slice workflow, and when testing cross-slice interactions, stub the public interface or use shared test helpers rather than instantiating another slice's internals. Covers slice test setup, isolation strategies, and integration testing across slices. Trigger words: test slice, slice test, isolate slice, slice isolation, test boundaries, slice specs, Hanami slice testing.

igmarin a21963b 2 files · 8.3 KB Updated

File contents

igmarin/hanakai-yaku/tree/main/skills/slices/test-slice commit a21963be9e

Frequently asked questions

npx skillmds@latest add igmarin/test-slice