Skip to content

Instantly share code, notes, and snippets.

@dsbw
Created September 16, 2013 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsbw/6584966 to your computer and use it in GitHub Desktop.
Save dsbw/6584966 to your computer and use it in GitHub Desktop.
class Pusher
#initialization stuff
@config = information_about_queue_I_wish_to_monitor
Mqhelper::subscribe_to_queue(@config) do |delivery_info, properties, payload |
process payload
end
end
#Moving helps in the sense that my RSpec can directly call process, but my class is still listening to @config info
#So do I create a fake MQ? Do I create a real MQ and have my tests put stuff in it to trigger the process call?
def process(payload)
#code moved from initialization
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment