是否可以在MiniTest中将测试标记为待处理?


Answers:


138

我花了几分钟浏览RubyDocs才能弄清楚实现这一点的实际语法。想通了,我想把它扔在这里,以节省一些未来的人点击几下。

从测试内部,只需调用skip()方法,如下所示:

skip("reason for skipping the test")

该方法是MiniTest::Assertions#skip- http://docs.seattlerb.org/minitest/Minitest/Assertions.html#method-i-skip




6

另外,在使用MiniTest :: Spec时,如果不将块传递给it(),则测试将标记为已跳过。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.