Curated library of 28 atomic skills and 9 personas for Ruby on Rails development. Organized by category: testing, code-quality, engines, infrastructure, api, context, and personas. Covers code review, architecture, security, testing (RSpec), engines, Hotwire, and TDD automation. Shared Ruby skills (YARD docs, DDD, service objects) have moved to ruby-core-skills.
93
95%
Does it follow best practices?
Impact
93%
1.16xAverage score across 28 eval scenarios
Advisory
Suggest reviewing before use
Use this complete, production-ready example to format your output when asked to write or verify RSpec tests.
spec/services/invoices/mark_overdue_spec.rb) is the smallest strong boundary that fully isolates this domain behavior.change { invoice.reload.overdue? }.from(false).to(true)) and ignoring unrelated fields.NameError: uninitialized constant Invoices::MarkOverdue).# spec/services/invoices/mark_overdue_spec.rb
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Invoices::MarkOverdue do
describe '.call' do
subject(:result) { described_class.call(invoice: invoice) }
context 'when the invoice is unpaid and past its due date' do
let(:invoice) { create(:invoice, due_date: 2.days.ago, paid_at: nil) }
it 'marks the invoice overdue' do
expect { result }.to change { invoice.reload.overdue? }.from(false).to(true)
end
end
context 'when the invoice is already paid' do
let(:invoice) { create(:invoice, due_date: 2.days.ago, paid_at: Time.current) }
it 'does not mark the invoice overdue' do
expect { result }.not_to change { invoice.reload.overdue? }
end
end
end
end# app/services/invoices/mark_overdue.rb
# frozen_string_literal: true
module Invoices
class MarkOverdue
def self.call(invoice:)
return { success: false, error: 'Invoice already paid' } if invoice.paid_at.present?
if invoice.due_date < Time.current
invoice.update!(overdue: true)
{ success: true }
else
{ success: false, error: 'Invoice not yet due' }
end
end
end
endRun Command:
bundle exec rspec spec/services/invoices/mark_overdue_spec.rbOutput:
An error occurred while loading ./spec/services/invoices/mark_overdue_spec.rb.
Failure/Error:
RSpec.describe Invoices::MarkOverdue do
NameError:
uninitialized constant Invoices::MarkOverdue
# ./spec/services/invoices/mark_overdue_spec.rb:5:in `<top (required)>'
Finished in 0.00005 seconds (files took 0.12 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examplesRun Command:
bundle exec rspec spec/services/invoices/mark_overdue_spec.rbOutput:
..
Finished in 0.02415 seconds (files took 1.25 seconds to load)
2 examples, 0 failures| Check Level | Command | Expected Outcome |
|---|---|---|
| Focused Spec | bundle exec rspec spec/services/invoices/mark_overdue_spec.rb | 2 examples, 0 failures |
| Full File | bundle exec rspec spec/services/invoices/mark_overdue_spec.rb | 2 examples, 0 failures |
| Broader Suite | bundle exec rspec | 42 examples, 0 failures |
| Code Linter | bundle exec rubocop app/services/invoices/mark_overdue.rb | no offenses detected |
Invoice has attributes due_date:datetime, paid_at:datetime, and overdue:boolean (default: false), matching the schema.:invoice factory is registered and defaults to active, unpaid records.travel_to for testing boundary conditions rather than setting static past dates in let without time freezing.it/specify descriptions contain the word "and".let! is justified (none used here as lazy let is sufficient).2.days.ago)..tessl-plugin
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
skills
api
generate-api-collection
implement-graphql
code-quality
apply-code-conventions
apply-stack-conventions
assets
snippets
code-review
refactor-code
review-architecture
security-check
context
load-context
setup-environment
engines
create-engine
create-engine-installer
document-engine
extract-engine
release-engine
review-engine
test-engine
upgrade-engine
infrastructure
implement-background-job
implement-hotwire
optimize-performance
review-migration
seed-database
version-api
personas
testing
plan-tests
test-service