What problem does it solve?
Rails testing can be complex; this skill provides a structured guide for Minitest-based testing in Rails apps, covering setup, conventions, and best practices to improve reliability and maintainability.
Core Features & Use Cases
- TDD cycle: Red-Green-Refactor workflow to drive test-driven development.
- Minitest & fixtures: Guidance on writing model, controller, and integration tests using fixtures.
- Test doubles & tooling: Use of VCR + WebMock for HTTP interactions, Capybara + Selenium for system tests, and SimpleCov for coverage.
- Practical examples: Ready-to-run snippets and test structure conventions to accelerate adoption in Rails projects.
Quick Start
Run the standard Rails test suite to verify code changes and system tests via rails test and rails test:system; follow the Red-Green-Refactor cycle as you work.