testing-patterns
Installation
SKILL.md
Testing Patterns
Write tests that are readable, reliable, and fast. Follow these patterns consistently.
Arrange/Act/Assert
Every test has three sections separated by blank lines:
- Arrange — set up objects, database state, dependencies
- Act — exercise the system under test (one action)
- Assert — verify the result
it "adds the tag to the user" do
tag = create(:tag)
user = create(:user, tags: [])
user.add_tag(tag)