I'm working on finding a stub for:
@redis.subscribe(key) do |on| on.message do |channel, message| handle_message(message) end end
However I am unsure what type of object on
is? How can we iterate on two fields channel, and message without a .each
block? This seems to be a pretty common chunk of code if anyone had any examples for some unit tests.