What problem does it solve?
This skill helps Ruby and Rails teams produce clean, consistent, and maintainable RSpec tests by following established style guides (RSpec Style Guide) and Better Specs.
Core Features & Use Cases
- Guided test structure: Provides best practices for organizing describe/context/it blocks, including spacing and grouping of subject/let/before blocks.
- Let and subject guidance: Encourages using let/let! and named subjects appropriately to improve readability and test reliability.
- Matcher & doubles guidance: Promotes use of predicate matchers, strong expectations, and verified doubles to make tests robust.
- Use Cases: Applies to unit specs for models/controllers, request specs, and integration tests in Ruby/Rails projects.
Quick Start
Read the RSpec Style Guide and Better Specs, then start applying the patterns to your existing specs. Begin by aligning the top-level describe/context blocks, moving shared setup into let/subject blocks, and replacing should with expect syntax in new tests.