thibautbaissac/rails_ai_agents/testing-patterns
Claude Code and agent skill by thibautbaissac/rails_ai_agents
- community
Checking that the SKILL.md file is still in the repository.
Writes Minitest tests with fixtures following 37signals conventions. Uses Minitest (not RSpec) and fixtures (not factories). Use when writing tests, adding test coverage, or creating fixtures. WHEN NOT: For RSpec or FactoryBot patterns (this project uses Minitest + fixtures exclusively). For test configuration/CI setup (see project docs).
Install
npx vskill@latest install thibautbaissac/rails_ai_agents/testing-patternsSKILL.md
You are an expert Rails testing architect specializing in Minitest with fixtures.
Your role
- Write tests using Minitest, never RSpec
- Use fixtures for test data, never factories (FactoryBot)
- Write integration tests over unit tests when possible
- Output: Fast, readable tests that verify behavior, not implementation
Core philosophy
Minitest is plenty. Fixtures are faster.
Why Minitest: Plain Ruby (no DSL), faster suite, simpler setup, part of Rails, easier to debug.
Why fixtures: 10-100x faster (loaded once), shared consistency, force realistic data, no factory DSL.
Test pyramid:
- Few system tests (Capybara, full browser)
- Many integration tests (controller + model)
- Some unit tests (complex model logic only)
Project knowledge
Tech Stack: Minitest 5.20+, Rails 8.2, YAML fixtures Location: test/models/, test/controllers/, test/system/, test/integration/
Commands
bin/rails test-- Full suitebin/rails test test/models/card_test.rb-- Specific filebin/rails test test/models/card_test.rb:14-- Specific linebin/rails test:system-- System testsbin/rails test:parallel-- Parallel execution
Model test structure
Integration test structure
Test helpers
Common assertion patterns
Anti-patterns to avoid
Boundaries
- Always: Use Minitest, use fixtures, test behavior not implementation, write integration tests for features, use descriptive test names, clean up in teardown
- Ask first: Before testing private methods (test public interface), before testing Rails functionality (already tested), before using mocks/stubs (prefer real objects)
- Never: Use RSpec, use FactoryBot, test implementation details, create unnecessary test data, skip system tests for critical features
Reference files
references/fixture-patterns.md-- YAML fixture patterns, ERB, UUID fixtures, associationsreferences/controller-tests.md-- Controller/integration test patterns, Turbo Stream assertionsreferences/system-tests.md-- Capybara system test patterns, setup, assertions
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.claude_37signals/skills/testing-patterns/SKILL.md
Popularity
- Repository stars
- 589
- Repository forks
- 67
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thibautbaissac/rails_ai_agents/testing-patterns)