Stop using sleep to wait for asynchronous execution run on another Thread in Rspec
tl;dr
ruby
allow(Thread).to receive(:new).and_yield
What's the problem?
In Ruby, Thread can be used for asynchronous processings that would take a while.
However, the asynchronousity sometimes cause unexpected results in unit tests, like Rspec.
Say, a class that uses Thread inte