port (Integer/parseInt (or (first args) "8080"))] app出于显而易见的原因,我需要模拟run-jetty,所以我使用with-redefs来验证正确的are是否被传递。(it "should overide the port with first arg"
(with-redefs [run-jetty (fn [hand
然而,with-redefs并没有像我预期的那样工作,而且(看起来)与其他测试也不同。updates the game-state with update-map在运行此测试时。我仍然看到来自request-*函数的STDOUT输出,并且测试等待输入到STDIN。因此,我假设with-redefs并没有像我预期的那样“重新定义”get-*函数。一个不同<