应该的替代品?

发布于 2025-01-06 22:56:09 字数 146 浏览 0 评论 0原文

在开发项目时,我转向shoulda进行测试,因为它是我熟悉的。然而,该项目已经一年多没有发布了。我想知道是否有人对替代方案有建议,或者我是否应该坚持应该?

When developing a project, I turned to shoulda for testing just because it's what I was familiar with. However, the project hasn't had a release in over a year. I'm wondering if anyone has recommendations on alternatives, or if I should just stick with shoulda?

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

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

发布评论

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

评论(2

情定在深秋 2025-01-13 22:56:09

非凡的宝石是我发现的最接近Shoulda的宝石。不幸的是,它似乎已经很久没有更新了。它还依赖于 RSpec 并且与 Test::Unit 不兼容。

我不清楚它对 Rails 3 的支持有多好 - 尽管有一些关于如何启动和运行它的说明。

在研究了 Shoulda 和 Remarkable 之后,我决定选择 Shoulda,因为它似乎仍然是更有可能更新的助手集。

使用 Shoulda 时遇到的问题之一是 Thoughtbot 使用 RSpec 而不是 Test::Unit,这也是 Shoulda gem(为了 Test::Unit 用户的利益而存在)很少有活动的部分原因 - gem 的 RSpec 组件 shoulda-matchers 最近已更新。 Thoughtbot 还在 2012 年 1 月找到了 shoulda-context 的新维护者 (这是与 shoulda-matchers 一起使用的 gem,以使 Test::Unit 中的所有内容正常工作 - Shoulda gem 实际上只引入 shoulda-matchers 和 Shoulda-context)我预计应该更多地关注 Test::Unit 方面的发展。

希望这些举措至少能让人们相信 Shoulda for Test::Unit 今后会更频繁地更新。在没有任何其他建议的情况下,我暂时会坚持使用 Shoulda。

The remarkable gem is the closest I've found to Shoulda. Unfortunately it looks like it hasn't been updated in even longer. It also relies on RSpec and it not compatible with Test::Unit.

It isn't clear to me how well it supports Rails 3 - although there are some instructions for getting it up and running.

After looking into both Shoulda and Remarkable I decided to go with Shoulda as it still seemed the more likely set of helpers to be updated.

One of the issues you will have with shoulda is that Thoughtbot uses RSpec rather than Test::Unit, which is part of the reason that the Shoulda gem (which exists for the benefit of Test::Unit users) has seen little activity - the RSpec component of the gem, shoulda-matchers, has been updated much more recently. Thoughtbot also found a new maintainer for shoulda-contextin Jan 2012 (this is the gem required alongside shoulda-matchers to get everything working in Test::Unit - the shoulda gem really only pulls in shoulda-matchers and shoulda-context) so there should be more focus on the Test::Unit side moving forward I expect.

Hopefully these moves give at least a little confidence that Shoulda for Test::Unit will be updated more frequently moving forward. In the absence of any other suggestions I would stick with Shoulda for the time being.

油焖大侠 2025-01-13 22:56:09

Rspec 是用于 ruby​​ 测试的最常见的 BDD 框架,并且非常流行。如果您喜欢 shoulda 中的某些断言,它可以很好地与 shoulda 断言配合使用。 Ruby 还默认附带了用于测试的 test/unit。
那么,您目前对“shoulda”有哪些问题?

Rspec is the most common BDD framework used for testing in ruby and is quite popular. It works well with shoulda assertions in case u like some of the assertions in shoulda. Ruby also ships by default with test/unit for testing.
Between, what are the issues you have with shoulda at the moment?

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