For example, I have class A.
class A end
And I want the method to be launched on the instance instance of this class.
A.any_instance.stub(:my_method).and_return(<here is the same instance on which my_method is called should got>)
Is it possible to do something similar in RSpec?
source share