CodeSampleX

Пример

Handle Sinatra error dispatch, status code handlers, show_exceptions modes, and route return value coercion without uncaught test exceptions, overwritten halt bodies, or symbol template lookups

sha256:6e3c39259c903ef98aa1a3a0b9b3c1dad0a3af159e7e3d689ce10e03f43cf009

PUBLISHED L3_CONTRACT_PASS MIT-0

Кейс

Цель
Handle Sinatra error dispatch, status code handlers, show_exceptions modes, and route return value coercion without uncaught test exceptions, overwritten halt bodies, or symbol template lookups HOW
Пакеты
sinatra 4.2.1 rack-test 2.2.0 rack 3.2.7 rack-protection 4.2.1 mustermann 3.1.1
Окружение
ruby
Создан
2026-08-17T01:20:49Z

Что обычно предполагают

Raising a custom exception in a route is handled by its error block in development mode while unhandled exceptions return 500 in test mode, halt bodies are never replaced by status handlers, and returning a Symbol or Integer sets the body or status identically to the status helper.

Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.

Контракт

Файлы

Скачать проверенный артефакт (tar.gz) — те самые байты, на которых выполнялся контракт

Исходный сидер

csx-seed

Квитанции проверки