ryan-nguyen-01/maestro/rspec

Claude Code and agent skill by ryan-nguyen-01/maestro

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

RSpec testing best practices for Ruby and Rails applications, covering test organization, data management, and isolation patterns.

Install

npx vskill@latest install ryan-nguyen-01/maestro/rspec

SKILL.md

The same SKILL.md was published earlier as ryan-nguyen-01/maestro/rspec.

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, and it blocks
  • Use the expect syntax for improved assertion readability
  • Keep test code concise without unnecessary complexity
  • Include comments explaining complex logic
Test Organization
  • Use describe for classes/modules and context for different scenarios
  • Use the subject helper to prevent repetition when defining objects under test
  • Mirror your source file structure within the spec directory
Test Data Management
  • Leverage let and let! for minimal, necessary setup
  • Prefer FactoryBot factories over fixtures for generating test data
  • Create only the data necessary for each test
Test Isolation
  • Each test must be independent without shared state between tests
  • Mock external services (APIs, databases) and stub methods appropriately
  • Avoid over-mocking: test real behavior when feasible
Reduce Duplication
  • Share common behaviors across contexts using shared_examples
  • Extract repetitive patterns into helpers or custom matchers
  • Use shared_context for common setup across multiple specs

Example Structure

ruby
RSpec.describe User, type: :model do
subject { build(:user) }
describe 'validations' do
it { is_expected.to validate_presence_of(:email) }
it { is_expected.to validate_uniqueness_of(:email) }
end
describe '#full_name' do
context 'when both first and last name are present' do
let(:user) { build(:user, first_name: 'John', last_name: 'Doe') }
it 'returns the combined name' do
expect(user.full_name).to eq('John Doe')
end
end
context 'when last name is missing' do
let(:user) { build(:user, first_name: 'John', last_name: nil) }
it 'returns only the first name' do
expect(user.full_name).to eq('John')
end
end
end
end

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
13

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ryan-nguyen-01/maestro/rspec/badge)](https://verified-skill.com/skills/ryan-nguyen-01/maestro/rspec)

Something wrong with this skill or its page? Tell us.