社区首选的 Ruby 单元测试框架是什么?

发布于 2024-08-06 07:21:56 字数 152 浏览 8 评论 0原文

在 Java 领域,主要使用 JUnit,而在 .NET 中,我相信 nUnit 非常流行。社区是否就 Ruby 世界的单元测试框架达成一致?

背景:我问这个问题是因为我是 Ruby 新手,想在学习 Ruby 的同时练习 TDD。到目前为止,我只玩过 Test::Unit。

In the Java space, JUnit is predominately used and in .NET I believe nUnit is very popular. Is a community agreed upon unit testing framework for the Ruby world?

Background: I ask because I am new to Ruby and want to practice TDD at same time as I learn Ruby. So far I've only played with Test::Unit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浮光之海 2024-08-13 07:21:56

您可以坚持使用 Test::Unit 或者您可以使用 Shoulda 或使用 Context 的一些很酷的上下文。

另一方面,如果您更喜欢 BDD,那么您可以安全地坚持使用 RSpec

至于验收测试,请使用 Cucumber

You can stick to Test::Unit or you can have nice extensions to it using Shoulda or some cool contexts using Context.

On the other side, if you prefer BDD then you can safely stick to RSpec.

As for for acceptance testing use Cucumber .

戴着白色围巾的女孩 2024-08-13 07:21:56

最流行的一个是 RSpec,尽管两者都是 期望test/单位相当有名。

The most popular one is RSpec, although both expectations and test/unit are quite well-known.

浪漫之都 2024-08-13 07:21:56

您可能想查看我开发的 manager gem。它不仅是一个测试框架,而且同时还提供文档。

You may want to look into the manager gem that I have developed. It not only is a test framework, but is does documentation as well at the same time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文