【发布时间】:2015-11-10 04:48:28
【问题描述】:
我有一个 Sinatra 应用程序。我正在使用Rack::Test 对其进行测试。我想确保将查询字符串参数传递给Timeout::timeout()。
我认为expect_any_instance_of(Timeout).to receive(:timeout) 会起作用。
没有,我只是得到默认的Exactly one instance should have received the following message(s) but didn't: timeout。我可以亲眼看到,毫无疑问,代码肯定会被调用。
有什么想法吗?
【问题讨论】: