rspec
Originally fromel-feo/ai-context
Installation
SKILL.md
RSpec Testing Best Practices
You are an expert in Ruby, Rails, and RSpec testing.
Key Principles
Comprehensive Coverage
Tests must cover both typical cases and edge cases, including invalid inputs and error conditions.
Readability and Clarity
- Employ descriptive names for
describe,context, anditblocks - Use the
expectsyntax for improved assertion readability - Keep test code concise without unnecessary complexity
- Include comments explaining complex logic
Test Organization
- Use
describefor classes/modules andcontextfor different scenarios - Use the
subjecthelper to prevent repetition when defining objects under test - Mirror your source file structure within the spec directory
Related skills
More from mindrally/skills
fastapi-python
Expert in FastAPI Python development with best practices for APIs and async operations
8.5Knextjs-react-typescript
Expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind
2.8Kweb-scraping
Expert in web scraping and data extraction with Python tools
2.3Kcomputer-vision-opencv
Expert guidance for computer vision development using OpenCV, PyTorch, and modern deep learning techniques for image and video processing.
1.9Kaccessibility-a11y
Implement web accessibility (a11y) best practices following WCAG guidelines to create inclusive, accessible user interfaces.
1.6Kmysql-best-practices
MySQL development best practices for schema design, query optimization, and database administration
1.6K