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
…pondTo`
Fixesrubocop#39.
This PR fixes an incorrect autocorrect for `Minitest/AssertRespondTo` and `Minitest/RefuteRespondTo`
when using assertion method calling `respond_to` with receiver omitted.
…pondTo`
Fixesrubocop#39.
This PR fixes an incorrect autocorrect for `Minitest/AssertRespondTo` and `Minitest/RefuteRespondTo`
when using assertion method calling `respond_to` with receiver omitted.
Given the test statement:
assert respond_to? :token_payment_method
The Minitest/AssertRespond cop auto corrects that to
assert_respond_to(:token_payment_method)
When the test is run, an error message is returned:
ArgumentError: wrong number of arguments (given 1, expected 2..3)
The log message is
[Corrected] Minitest/AssertRespondTo: Prefer using assert_respond_to(:token_payment_method) over assert(respond_to? :token_payment_method).
Minitest assert_respond_to requires an object:
This can be corrected by editing the corrected test statement to:
assert_respond_to(self, :token_payment_method)
Using Rails 6.01, Ruby 2.65, Minitest 5.13.0
The text was updated successfully, but these errors were encountered: