Files
gstack/test/fixtures/review-eval-enum.rb
Garry Tan 17d9c7fec0 feat: add evals for RECOMMENDATION format, session awareness, and enum completeness
Free tests (Tier 1): RECOMMENDATION format + session awareness in all
preamble SKILL.md files, enum completeness checklist structure and CRITICAL
classification.

E2E eval: /review catches missed enum handlers when a new status value
is added but not handled in case/switch and notify methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 01:15:45 -05:00

28 lines
759 B
Ruby

# Existing file on main: order model with status handling
class Order < ApplicationRecord
STATUSES = %w[pending processing shipped delivered].freeze
validates :status, inclusion: { in: STATUSES }
def display_status
case status
when 'pending' then 'Awaiting processing'
when 'processing' then 'Being prepared'
when 'shipped' then 'On the way'
when 'delivered' then 'Delivered'
end
end
def can_cancel?
%w[pending processing].include?(status)
end
def notify_customer
case status
when 'pending' then OrderMailer.confirmation(self).deliver_later
when 'shipped' then OrderMailer.shipped(self).deliver_later
when 'delivered' then OrderMailer.delivered(self).deliver_later
end
end
end