codesamplex

サンプル

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

ケース

ゴール
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
パッケージ
rack-test 2.2.0 rack 3.2.7
環境
ruby
作成日
2026-08-16T16:44:42Z

よくある思い込み

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

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート