How to assert that a method call was not made, without any_instance?
问题 I have a class, that in one situation should call :my_method , but in another situation must not call method :my_method . I would like to test both cases. Also, I would like the test to document the cases when :my_method should not be called. Using any_instance is generally discouraged, so I would be happy to learn a nice way to replace it. This code snippet is a reduced example on what I kind of test I would like to write. class TestSubject def call call_me end def call_me; end def never