-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add support for have_output* with no arguments #600
base: main
Are you sure you want to change the base?
Add support for have_output* with no arguments #600
Conversation
I've noticed the failure message is not working properly; I'll fix that and push again |
Hi @peagha, you seem to have removed the 'motivation and context' section from the pull request template. Can you tell me a little bit more about where you encountered problems with the current behavior? Also, which version of Aruba are you using? |
@mvz thanks for your answer! The main motivation is that I had a scenario where the command was failing (exit status != 0) and I wanted to have feedback on that. Older versions of Aruba used to print the whole output when using
In the latest version, when using
The output is useful to understand why the command wasn't successfully executed, therefore I added to my app: expect(last_command_stopped).not_to have_output_on_stderr What would print the STDERR whenever something is wrong. But that doesn't work because I'm using the lates version of Aruba ( |
8d02d98
to
a4f3ee6
Compare
I've updated the failure messages code and they should be working now |
a4f3ee6
to
6cd38c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given you're changing the output of the rspec failure messages (And matchers by extension), we need at the very least 2 rspec message tests (Ideally more)
Summary
Allow have_output* matchers to work with no arguments
Details
When using the have_output* matchers they will fail to match if no argument is provided:
The documentation has examples like that:
aruba/lib/aruba/matchers/command/have_output_on_stderr.rb
Lines 13 to 15 in 8d02d98
aruba/lib/aruba/matchers/command/have_output.rb
Lines 15 to 17 in 8d02d98
How Has This Been Tested?
RSpec examples were added to cover the changes
Types of changes
Checklist:
TODO: