Skip to content

Improve mock block handling#51

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
improve-mock-expectations
Jun 14, 2026
Merged

Improve mock block handling#51
samuel-williams-shopify merged 1 commit into
mainfrom
improve-mock-expectations

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

  • Forward blocks through Sus::Mock#wrap when calling the original method.
  • Make receive(...).with_block(...) evaluate the supplied predicate instead of only checking for a non-nil block.
  • Add regression coverage for both behaviours and an unreleased note.

Testing

  • /nix/store/jh918yiwd5cs4pjg005ac32m2q7ckw3l-ruby-4.0.5/bin/ruby -Ilib bin/sus

@samuel-williams-shopify samuel-williams-shopify merged commit d05cfec into main Jun 14, 2026
36 of 40 checks passed
@samuel-williams-shopify samuel-williams-shopify deleted the improve-mock-expectations branch June 14, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant