Shoulda:让Test::Unit也BDD

Shoulda是一个Rails插件,一个让Test::Unit也BDD的框架。这是官方的广告语:

Shoulda – Making tests easy on the fingers and eyes

我是在MountainWest RubyConf 2008的视频看到Tammer Saleh 讲了Shoulda才知道这个框架的:
http://mwrc2008.confreaks.com/12saleh.html

下面是官方资料的一点翻译:

Shoulda Rails插件能让你轻松地写出优雅,易懂,易维护的测试。Shoulda 包含了添加到了Test::Unit框架的宏,断言和助手方法。不需重新编写测试,完全适合已有的测试。

助手方法 – context方法和should方法使用了类似Rspec的测试块语法。还有,内置的contexts和一种可读性极强的语法。

宏 – 通过强大的宏生成上百行Controller和ActiveRecord测试。能让你快速开始,确保应用程序遵循最佳实践。

断言 – 许多一般的Rails测试惯用法提取了一个好用的断言集合。

也有一个精简的Shoulda的Gem包适合非Rails应用。

以后应该会继续翻译下去的。

Shoulda 官方主页
Shoulda 的RDocs

This entry was posted on 星期六, 05月 3rd, 2008 at 7:19 pm and is filed under Ruby. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Comments so far

Be the first to comment on this entry.

Have your say

You must be logged in to post a comment.

Recent Posts:
  1. Blog已搬迁 - 2008-08-22
  2. a few interesting rails plugin - 2008-08-06
  3. Get Start Java Network App Dev - 2008-08-06
  4. 思考着Blog搬家 - 2008-07-28
  5. a bug in attachment_fu - 2008-07-28
  1. 我的梦想

    我的梦想是成为世界级的软件开发者。。。 联系我请mailto: chenk85 AT gmail.com 或者加我MSN: chenk85 AT live.cn
  2. 标签

  3.  

    05月 2008
    « Apr   Jun »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  4. 文章分类

  5. 存档页

  6. 评头论足

    • 功能