Shoulda, Rails Tests , and Autotest

Shoulda, Rails Tests , and Autotest

无人问我粥可暖 发布于 2021-11-29 字数 952 浏览 936 回复 1 原文

I'm trying to model my tests after the great work that the Thougtbot guys have done. They seem to use the test framework built into Rails Shoulda. Great.

I have been hearing a lot about Autotest - that its magical-ness should make things easier.... I expected that things would 'just work' if I installed it. My rake test:units already all pass. When I run autotest, nothing happens. I've barely found any information on how autotest works, and only brief mentions of a special file '.autotest' that's supposed to do something other than hold the requires for growl and redgreen.

I'm coming from a CruiseControl background here... but it seems like things should be way more apparent. Does anybody have experience running Rails' native tests along with Shoulda and Autotest?

Update|Resolved apparently the discover.rb file in seed-fu was making autotest think it was testing for RSpec, not Test::Unit.

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。



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


染柒℉ 2022-06-07 1 楼

A plugin I'm using, seed-fu, had a discover.rb to 'help' autotest. In my case though it made autotest think I was running RSpec and everything else broke.