rspec 和 heckle 的兼容性如何?
我目前正在使用 test/unit,并且正在考虑使用 rspec。 但是,我注意到 rspec 目前 不支持 heckle在 ruby 1.9.1 中,除了目标模块/类/方法之外,不支持向 heckle 传递任何参数。
当前使用 heckle 和 rspec 是否存在任何其他问题,或者除了这两个问题之外,它们是否可以很好地协同工作?
另外,如果我暂时保留测试/单元,我应该考虑将它与黄瓜一起使用吗?
编辑:1.9.1问题不是rspec的错 - heckle无法在ruby 1.9.1 因为 parsetree 无法在 ruby 1.9.1 上运行。
I'm currently using test/unit, and I'm considering using rspec. However, I've noticed that rspec currently doesn't support heckle in ruby 1.9.1, and doesn't support passing any parameters to heckle apart from the target module/class/method.
Are there any other current problems with using heckle and rspec, or do they work well together apart from those two issues?
Also, if I stay with test/unit for the moment, should I consider using it with cucumber?
Edit: The 1.9.1 issue isn't rspec's fault - heckle can't run on ruby 1.9.1 because parsetree can't run on ruby 1.9.1.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
上次我检查时,Heckle+RSpec 效果不是很好,而且我认为没有多少人一起使用它们。
早在 2008 年春天,我对此进行了调查,发现 RSpec 和 Heckle 已经有一段时间没有合作了。 我制作了一个补丁并被 RSpec 1.1.14 接受。 即使在进行了这些更改之后,我仍然没有发现 Heckle 非常有用。 如果我没记错的话,问题是 Heckle 本身会因重要的程序而崩溃。
事实就是如此,实在是太可惜了。 如果您想提供帮助,您可能需要查看 boo-hiss 项目: http:// github.com/halorgium/boo_hiss/tree/master 。
更新:经过两年的中断,Heckle 的新版本(Heckle 1.4.2)已于上周发布。 也许这已经解决了我遇到的问题。
The last time I checked, Heckle+RSpec didn't work very well, and I don't think many people are using them together.
Back in the spring 2008 I looked into this and noticed that RSpec and Heckle hadn't been working together at all for some time. I made a patch and it was accepted into RSpec 1.1.14. Even after those changes, I didn't find Heckle very usable. If I remember correctly the problem is that Heckle itself crashes with non-trivial programs.
It is really a pity that the situation is what it is. If you want to help, you may want to look at the boo-hiss project: http://github.com/halorgium/boo_hiss/tree/master .
Update: After a two-year hiatus, a new version of Heckle (Heckle 1.4.2) was released last week. Maybe this has fixed the problems I experienced.
我目前正在运行 heckle 1.4.2 和 rspec 1.2.4 来测试 Addressable。 我建议直接使用 spec 命令来询问任何事情,而不是通过 rake 任务进行设置。 质问是我通常在发布之前做的事情,而不是在常规开发期间做的事情,因为它非常耗时。 当您试图追踪幸存的突变时,您可能需要逐个方法进行。
旧版本的 RSpec 比较啰嗦——转储所有失败规格的完整规格结果——但我发送了一个补丁来修复这个问题。 任何最新版本都没有这个问题,并且质问应该可以正常工作。
例如:
输出:(
结果不典型。)
I am currently running heckle 1.4.2 and rspec 1.2.4 to test Addressable. I recommend using the spec command directly to heckle anything rather than setting it up through a rake task. Heckling is something I typically do just before a release, rather than during regular development because it's so time-intensive. And when you're trying to track down surviving mutations, you're likely to want to go method-by-method.
Older versions of RSpec were much chattier — dumping the full spec results for all failing specs — but I sent through a patch that fixed that. Any of the recent versions don't have that problem, and heckling should work just fine.
For example:
Output:
(Results not typical.)