Skip to content

Instantly share code, notes, and snippets.

@rob-murray
Created November 10, 2015 16:11
Show Gist options
  • Save rob-murray/f456256d75f18efd39aa to your computer and use it in GitHub Desktop.
Save rob-murray/f456256d75f18efd39aa to your computer and use it in GitHub Desktop.
wisper gem stubber
class StubWorkerService
def initialize(method_to_call, *args)
@method_to_call = method_to_call
@args = args
end
def subscribe(worker, *_)
@worker = worker
self
end
def run
@worker.send(@method_to_call, *@args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment