You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please provided more details, what are you testing exactly?
I understand what the problem is, but at a glance it’s unlikely that the respond_to matcher is designed to check private methods. And, presumably, for a reason.
Expected behavior
Following usage is allowed:
This tests the subject responds to a private method
a_private_method
.Actual behavior
RSpec/RedundantPredicateMatcher
detected and autocorrected torespond_to(:symbol, true)
raises following error:
Because
respond_to
matcher accepts list of method symbols.https://www.rubydoc.info/gems/rspec-expectations/RSpec%2FMatchers:respond_to
Steps to reproduce the problem
Run rubocop on:
RuboCop RSpec version
The text was updated successfully, but these errors were encountered: