Sha256: a3f157129924157d9efb7292eacbc1e63588a835fed00dcd7fa3d1c38fef41eb

Contents?: true

Size: 676 Bytes

Versions: 8

Compression:

Stored size: 676 Bytes

Contents

require 'pry'
require 'securerandom'
require 'freddy'
require 'logger'

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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
freddy-jruby-0.4.9 spec/spec_helper.rb
freddy-0.4.9 spec/spec_helper.rb
freddy-0.4.8 spec/spec_helper.rb
freddy-0.4.7 spec/spec_helper.rb
freddy-0.4.6 spec/spec_helper.rb
freddy-0.4.4 spec/spec_helper.rb
freddy-jruby-0.4.3 spec/spec_helper.rb
freddy-0.4.3 spec/spec_helper.rb