spec/spec_helper.rb in message_bus-2.1.5 vs spec/spec_helper.rb in message_bus-2.1.6

- old
+ new

@@ -14,10 +14,10 @@ if backend == :postgres MESSAGE_BUS_CONFIG.merge!(:backend_options=>{:user=>ENV['PGUSER'] || ENV['USER'], :dbname=>ENV['PGDATABASE'] || 'message_bus_test'}) end puts "Running with backend: #{backend}" -def wait_for(timeout_milliseconds) +def wait_for(timeout_milliseconds=2000) timeout = (timeout_milliseconds + 0.0) / 1000 finish = Time.now + timeout Thread.new do while Time.now < finish && !yield