codesamplex

Beispiel

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

Fall

Ziel
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
Pakete
rack-test 2.2.0 rack 3.2.7
Umgebung
ruby
Erstellt
2026-08-16T16:44:42Z

Häufige Annahme

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

So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.

Contract

Dateien

Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief

Ursprungs-Seeder

csx-seed

Verifizierungsbelege