-
-
Notifications
You must be signed in to change notification settings - Fork 389
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 ruby 2.7...3.0 specs for Object#{taint,untaint,trust,untrust} #802
add ruby 2.7...3.0 specs for Object#{taint,untaint,trust,untrust} #802
Conversation
obj.taint | ||
}.should complain(/Object#taint is deprecated and will be removed in Ruby 3.2/) | ||
end | ||
end |
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 believe $VERBOSE
should be rolled back to default value to not affect other specs. AFAIK it isn't done by default.
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 changed all spots to use complain("...", verbose: true)
. I think that would address this.
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.
Yes, complain()
will restore it properly.
BTW I recently added a check that $VERBOSE
isn't changed by a spec example in MSpec, just not merged upstream yet.
o = Object.new.untrust | ||
o.trust | ||
o.should_not.untrusted? | ||
end |
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.
Not sure whether I understand what this case checks.
It might check that trust
method doesn't change object state. But o.should_not.untrusted?
assertion checks that untrusted?
returns false
. Wouldn't it be expected behavior if trust
worked and changed an object state?
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.
Put an o.should_not.untrusted?
above the o.trust
to show nothing happens
Thank you for the specs |
relates to #745
Closes checkbox for
Object#{taint,untaint,trust,untrust}