社区首选的 Ruby 单元测试框架是什么? [英] What is the community-preferred Ruby unit testing framework?

查看:40
本文介绍了社区首选的 Ruby 单元测试框架是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Java 领域,主要使用 JUnit,而在 .NET 中,我相信 nUnit 非常受欢迎.社区是否同意 Ruby 世界的单元测试框架?

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?

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

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.

推荐答案

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

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

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

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

至于验收测试使用 Cucumber .

As for for acceptance testing use Cucumber .

这篇关于社区首选的 Ruby 单元测试框架是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆