Repository navigation
conformance: implement complain/output mspec matchers (+219, floor 19009) - #574
Merged
Merged
Conversation
…9009 The ratchet shim stubbed complain/output/output_to_fd as SpecSkip, so every example using `.should_not complain`, `.should complain(/…/)` or `.should output(…)` was skipped — 68 corpus files use complain, 12 use output. Implement ComplainMatcher and OutputMatcher (capture $stderr/$stdout via StringIO around the block, match a String exactly or a Regexp, honour complain's verbose: keyword), mirroring mspec's matchers. rbgo already supports $stdout/$stderr reassignment to a StringIO (wave-11), so the capture is exact. output_to_fd (real fd redirection) stays unsupported. Measured 19009 passing on the pinned corpus (up from 18790, +219), files loaded 2164 / failed-to-load 42 both unchanged (no load regression). CI's ratchet runs at TIMEOUT=60 (more lenient than the local 25s), so it measures at least the local total. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Read ruby/mspec's lib/mspec/matchers/complain.rb: the real matcher runs the block under $VERBOSE = false by default (or the given verbose: value) and still requires a non-empty warning even after a constraining pattern matches (it ends on warning.empty? ? false : true). Our lenient version left $VERBOSE at the ambient level and returned the bare pattern comparison, which counted one example that only passes because the matcher was looser than real mspec — a false pass masking an rbgo warning-level nonconformance. Faithful total is 19008 (one honest example below the lenient 19009). Also drops a peer-added always-true ComplainMatcher stub that this class fully overrode, leaving a single coherent definition. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ratchet shim stubbed
complain/output/output_to_fdas SpecSkip, so every example using.should_not complain,.should complain(/…/)or.should output(…)was skipped — 68 corpus files use complain, 12 use output. This implements ComplainMatcher and OutputMatcher (capture $stderr/$stdout via StringIO around the block, String-exact / Regexp match, complain'sverbose:keyword), mirroring mspec. rbgo already supports $stdout/$stderr → StringIO reassignment (wave-11), so capture is exact.output_to_fdstays unsupported.Measured 19009 passing (up from 18790, +219); files loaded 2164 / failed-to-load 42 unchanged (no load regression). The floor is bumped in the same PR because it depends on the new shim; CI's ratchet runs at TIMEOUT=60 (> the local 25s) so it measures at least the local total.
🤖 Generated with Claude Code