What problem does it solve?
Rails projects often battle fragmented and repetitive testing patterns. This Skill consolidates helper tests, mailer tests, job tests, fixtures, and test helpers into a reusable reference to speed up development and ensure consistent testing practices.
Core Features & Use Cases
- Helper Tests: structured tests for views/helpers using ActionView::TestCase.
- Mailer Tests: patterns for testing ActionMailer deliveries and content.
- Job Tests: guidelines for enqueuing and performing ActiveJob jobs with proper assertions.
- Fixtures: examples and usage of test fixtures to ensure consistent data.
- Test Helpers: utility modules for session management and custom assertions.
- Test Database: setup and teardown guidance for reliable test isolation.
- Testing Tips: time travel, stubbing, and error handling techniques.
- Best Practices: do's and don'ts to keep tests robust.
- Running Tests: common commands and configurations to run the test suite.
Quick Start
In your project's CLAUDE.md, reference @agent-notes/rails/index.md to begin applying Rails testing patterns.