サンプル
Disprove the assumption that Mustermann match results are Ruby MatchData-like in index ordering.
sha256:78294c4c14e8f3a3a939835768466490bf1fb141543c7e35872aed2ce7070745
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Disprove the assumption that Mustermann match results are Ruby MatchData-like in index ordering. HOW
- パッケージ
- mustermann 4.0.0
- 環境
- ruby
- 作成日
- 2026-08-16T15:54:24Z
よくある思い込み
A successful Mustermann match should behave like Ruby MatchData, with index 0 equal to the full matched path.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- A match on `Mustermann.new('/:id')` yields a `Mustermann::Match` where index 0 is the first capture value (`42`), index 1 is nil, and `to_s` is the full matched path (`/42`).
- In this match shape, `match.params` and `match.to_h` both return `{"id"=>"42"}` while `match['id']` exposes the named capture directly.
ファイル
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9