-
Notifications
You must be signed in to change notification settings - Fork 16
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 success and fail to command response #10
Conversation
exit_status == 0 | ||
end | ||
|
||
def fail? |
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.
@kbrock Not sure I like the name .fail?
...it doesn't mix with .success?
(I would expect .fail?
to align with .succeed?
). I'm thinking .failure?
is a better name.
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.
cool.
I like the methods succeed?
and fail?
or succeeded? failed?
This is to make specs read better
expect(x).to be_success
expect(x).to be_failure
Hmm, maybe if we could:
expect(x).to have_succeeded
expect(x).to have_failed
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.
Even clearer would be
expect(x).to succeed
expect(x).to fail
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.
I'll play.
be_success
is automatically added.
Maybe there are some other auto matchers that have better wording
As far as Travis goes, I think I have to change the whole thing to go against 2.1.1, so ignore the failures. |
only ref I have found is the predicates listed at rspec matchers.
|
@chessbyte |
Yes, be_a_success and be_a_failure read much nicer. |
Checked commit kbrock@7620666 with rubocop 0.21.0 |
add success and fail to command response
No description provided.