我目前正在运行 heckle 1.4.2 和 rspec 1.2.4 来测试Addressable。我建议直接使用 spec 命令来解决任何问题,而不是通过 rake 任务进行设置。Heckling 是我通常在发布之前做的事情,而不是在常规开发期间,因为它非常耗时。当你试图追踪幸存的突变时,你可能想要逐个方法。
旧版本的 RSpec 更加健谈——为所有失败的规范倾倒完整的规范结果——但我发送了一个修复该问题的补丁。任何最近的版本都没有这个问题,并且质问应该可以正常工作。
例如:
spec spec/**/*_spec.rb --heckle Addressable::URI#normalize
输出:
**********************************************************************
*** Addressable::URI#normalize loaded with 25 possible mutations
**********************************************************************
25 mutations remaining...
24 mutations remaining...
23 mutations remaining...
22 mutations remaining...
21 mutations remaining...
20 mutations remaining...
19 mutations remaining...
18 mutations remaining...
17 mutations remaining...
16 mutations remaining...
15 mutations remaining...
14 mutations remaining...
13 mutations remaining...
12 mutations remaining...
11 mutations remaining...
10 mutations remaining...
9 mutations remaining...
8 mutations remaining...
7 mutations remaining...
6 mutations remaining...
5 mutations remaining...
4 mutations remaining...
3 mutations remaining...
2 mutations remaining...
1 mutations remaining...
No mutants survived. Cool!
(结果不典型。)