Sha256: 7e342b172017314ac6e93e928ebaa59d54daf4fe4a461c5b5a355f79850e8ba3
Contents?: true
Size: 865 Bytes
Versions: 6
Compression:
Stored size: 865 Bytes
Contents
require 'pry' require 'securerandom' require 'freddy' require 'logger' require 'hamster/experimental/mutable_set' Thread.abort_on_exception = true RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus config.order = 'random' end def random_destination SecureRandom.hex end def default_sleep sleep 0.05 end def wait_for(&block) 100.times do return if block.call sleep 0.005 end end def deliver(custom_destination = destination) freddy.deliver custom_destination, payload default_sleep end def logger Logger.new(STDOUT).tap { |l| l.level = Logger::ERROR } end def config {host: 'localhost', port: 5672, user: 'guest', pass: 'guest'} end def spawn_echo_responder(freddy, queue_name) freddy.respond_to queue_name do |payload, msg_handler| msg_handler.success(payload) end end
Version data entries
6 entries across 6 versions & 2 rubygems