Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法模拟睡眠并对其设定期望?
class Foo { def func = { Thread.sleep(100) } }
例如,在 Ruby 中,我只需将存根添加到 Thread。但是对于 Scalamock,我不确定如何将该模拟注入到类中。