codesamplex

Sample

Assert Rack::Test::UploadedFile defaults content_type to text/plain rather than inferring MIME types from file extensions and default_host defaults to example.org

sha256:a547a5386ea49e912d3240302a7c7194b1828e054d1785eb75c673f73f3711ef

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Assert Rack::Test::UploadedFile defaults content_type to text/plain rather than inferring MIME types from file extensions and default_host defaults to example.org HOW
Packages
rack-test 2.2.0 rack 3.2.7
Environment
ruby
Created
2026-08-16T16:44:42Z

Commonly assumed

Rack::Test::UploadedFile automatically infers the MIME content type from the file extension when the content_type argument is omitted.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts