Sample
Show that Sinatra preserves a mounted app’s root route when `PATH_INFO` is empty.
sha256:1d3dcbda4a83bad6d8a121efdde846f76e441a95f04b0cecea623b47b94ab2b9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Show that Sinatra preserves a mounted app’s root route when `PATH_INFO` is empty. HOW
- Packages
- sinatra 4.2.1
- Environment
- ruby
- Created
- 2026-08-17T02:47:36Z
Commonly assumed
A mounted Sinatra app should handle `GET /foo` via its `get "/"` route even when `PATH_INFO` is empty, instead of returning a 404.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- A request to `/foo` on a Sinatra app mounted at `/foo` with a `get "/"` route returns a 200 status, not 404, when the request has no trailing slash.
- assert_equal 200, root_without_trailing_slash.status
- assert_equal 'root', root_without_trailing_slash.body.read
- assert_equal 200, root_with_trailing_slash.status
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9