I'm working a project that uses a notify method that does does not belong to a method. I want to stub this method to help speed up my spec and keep my log clean. How can i do this?
require 'json'
require 'rest-client'
def notify(*params)
...
end
Use a before
block in your specs to stub the :notify method on subject
:
before do
allow(subject).to receive(:notify)
end