使用 Rspec 创建新的测试套件或扩展当前的 Test::Unit 设置?

发布于 2024-08-23 11:22:47 字数 203 浏览 4 评论 0原文

因此,我正在扩展一个朋友的项目,他使用 Test::Unit 通过 TDD 完成了所有开发。

我在所有项目中都使用 Rspec,并且希望避免学习新工具。使用 2 个独立的测试套件(一个在 Test::Unit 中,一个在 Rspec 中)是一种不好的做法吗?

我还考虑过使用 Shoulda 来扩展 Test::Unit ,感觉就像我在使用 Rspec 一样。

So I'm extending a friend's project and he's done all the development with TDD using Test::Unit

I use Rspec in all my projects and want to avoid having to learn a new tool. Is it bad practice to have 2 separate test suites, one in Test::Unit and one in Rspec?

I've also considered using Shoulda to extend Test::Unit to sort of feel like I'm using Rspec.

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

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

发布评论

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

评论(1

浮华 2024-08-30 11:22:47

很难轻松地知道您的代码是否被这两个框架所覆盖。

通过 Rspec,你可以使用所有 Test::Unit 的东西,比如assert_*

It's quite difficult to know easily if your code is cover by test or not with both framework.

With Rspec you can use all Test::Unit stuff like assert_*

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