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

验证回执