mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
17 lines
282 B
Ruby
17 lines
282 B
Ruby
|
RSpec.configure do |config|
|
||
|
config.color_enabled = true
|
||
|
end
|
||
|
|
||
|
def wait_for(timeout_milliseconds)
|
||
|
timeout = (timeout_milliseconds + 0.0) / 1000
|
||
|
finish = Time.now + timeout
|
||
|
t = Thread.new do
|
||
|
while Time.now < finish && !yield
|
||
|
sleep(0.001)
|
||
|
end
|
||
|
end
|
||
|
t.join
|
||
|
end
|
||
|
|
||
|
|