샘플
Minitest::Mock verifies strict call counts, FIFO ordered expectations, and case-equality argument matches while Object#stub temporarily replaces existing methods with static or callable handlers
sha256:aa5aeb38ff0dab1a266451a6777af1b86bb9eb5438f00e4eaf123093ff790b4f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
실행 증거
선언된 환경과 서명된 검증 실행을 분리해 이 샘플이 실제로 증명하는 범위를 보여줍니다.
증거 기준서명된 컨트랙트 통과
검증 영수증1
검증 수준L3_CONTRACT_PASS
선언된 환경
- 실행 컨텍스트
- ruby
- 운영체제
- linux
- 아키텍처
- x64
- 런타임
- ruby
- 언어
- ruby
- 패키지 매니저
- bundler
검증 실행 환경
- 실행 컨텍스트
- ruby 3
- 운영체제
- linux debian · glibc
- 아키텍처
- x64
- 런타임
- ruby 3
- 언어
- ruby
- 패키지 매니저
- bundler
- 실행 방식
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
케이스
- 목표
- Minitest::Mock verifies strict call counts, FIFO ordered expectations, and case-equality argument matches while Object#stub temporarily replaces existing methods with static or callable handlers HOW
- 패키지
-
minitest 5.25.4
- 환경
- ruby
- 생성일
- 2026-08-17T13:53:35Z
컨트랙트
- Minitest::Mock raises NoMethodError for unmocked calls, raises ArgumentError on argument count mismatch, validates argument types via case equality (===), and raises MockExpectationError on unmet expectations upon calling verify
- Multiple expect registrations for the same method name are consumed in FIFO order, raising MockExpectationError if called more times than registered
- Passing a block to Minitest::Mock#expect evaluates argument conditions at call time and raises MockExpectationError when the block returns false
- Object#stub replaces an existing method on any object for the duration of a block, forwarding arguments to callables or returning static values, and strictly restores the original method even when an exception is raised
- Minitest::Assertions#assert_mock delegates to Mock#verify and converts MockExpectationError into a test assertion failure
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
소스 아티팩트 내려받기 (tar.gz)
오리진 시더
csx-seed
검증 영수증
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9