39 lines
777 B
Markdown
39 lines
777 B
Markdown
## Skill Examples
|
|
|
|
**Good Skill Structure:**
|
|
|
|
```
|
|
---
|
|
name: testing-guide
|
|
description: Guidance on writing effective tests using RSpec and TDD practices
|
|
---
|
|
|
|
# Testing Guide
|
|
|
|
This skill provides testing guidance for Rails applications using RSpec.
|
|
|
|
## Quick Reference
|
|
- Use descriptive test names
|
|
- Follow AAA pattern (Arrange, Act, Assert)
|
|
- Mock external dependencies
|
|
- Test behavior, not implementation
|
|
|
|
<aaa_pattern>
|
|
## Arrange-Act-Assert Pattern
|
|
|
|
Structure tests in three clear phases:
|
|
- Arrange: Set up test data and conditions
|
|
- Act: Execute the code being tested
|
|
- Assert: Verify the results
|
|
|
|
Example: [concrete example here]
|
|
</aaa_pattern>
|
|
|
|
<mocking>
|
|
[Detailed guidance on mocking...]
|
|
</mocking>
|
|
```
|
|
|
|
Why it works: Overview first, progressive disclosure for details.
|
|
|