mardi 1 décembre 2015

How to stub method that doesn't belong to class in RSpec?

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?

lib/notify.rb

require 'json'
require 'rest-client'

def notify(*params)
  ...
end

Aucun commentaire:

Enregistrer un commentaire