Sha256: a46eb622e85322c31c65854627e7024d17d4fa995638f2d4306a33cbf676367a

Contents?: true

Size: 321 Bytes

Versions: 4

Compression:

Stored size: 321 Bytes

Contents

module SpecUtils
  module_function

  def wait_for(attempts: 100, interval: 0.1)
    attempts.times do
      return if yield
      sleep interval
    end
    raise "Waited for #{attempts} times but it never resolved"
  end

  def uuid(entity_number)
    sprintf("00000000-0000-0000-0000-%12.12d", entity_number)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nulogy_message_bus_producer-3.2.0 spec/support/spec_utils.rb
nulogy_message_bus_producer-3.1.1 spec/support/spec_utils.rb
nulogy_message_bus_producer-2.1.1 spec/support/spec_utils.rb
nulogy_message_bus_producer-2.1.0 spec/support/spec_utils.rb