【发布时间】:2010-10-12 13:15:06
【问题描述】:
使用 shoulda 后,很明显 shoulda 不再使用宏(对于首选匹配器,它们都已弃用)例如:
should_allow_custom_test
已弃用以下内容:
should allow_custom_test
但是,我能找到的所有文档都是针对以前的宏设置的,方法是将它们放在 shoulda_macros 目录中。我认为同样可以使用自定义 matcher 来完成,但应该找不到它们。
我正在使用的匹配器位于http://gist.github.com/613522
如何在我的TestCase 中加入自定义匹配器?
【问题讨论】:
标签: ruby-on-rails testing shoulda