Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make #have_output_size work on a process #924

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Apr 1, 2024

Summary

Make #have_output_size matcher work with process objects, and deprecate its use with strings.

Details

  • Simplify existing specs for #have_output_size matcher
  • Make #have_output_size matcher work with process objects
  • Deprecate use of `#have_output_size1 matcher with a string actual
  • Use #have_output_size matcher with process object in supplied step

Motivation and Context

Fixes #484.

How Has This Been Tested?

I ran the relevant specs and cukes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

mvz added 4 commits April 1, 2024 15:36
This reduces grouping and sets up the string object only once.
This allows use of the matcher without first calling #output on the
process. A possible improvement would be the option of specifying which
output should be matched (stderr, stdout, both).
Users of this matcher should switch to applying it to a process object,
or test the length of the string directly.
The use of #have_output_size with strings is deprecated.
@mvz mvz force-pushed the improve-have-output-size-matcher branch from 12e9aa7 to 561b141 Compare April 1, 2024 13:38
@mvz mvz marked this pull request as ready for review April 1, 2024 13:39
@mvz mvz merged commit c1826d5 into main Apr 1, 2024
18 checks passed
@mvz mvz deleted the improve-have-output-size-matcher branch April 1, 2024 14:18
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.

Make #have_output_size work on a process
1 participant