Shoulda、Rails 测试和自动测试
我正在尝试根据 Thougtbot 人员所做的出色工作来对我的测试进行建模。 他们似乎使用了 Rails Shoulda 内置的测试框架。 伟大的。
我听说过很多关于自动测试的事情——它的神奇之处应该会让事情变得更容易……我希望如果我安装了它,事情就会“正常工作”。 我的耙子测试:单位已经全部通过。 当我运行自动测试时,什么也没有发生。 我几乎没有找到任何有关自动测试如何工作的信息,只简单提到了一个特殊文件“.autotest”,该文件除了满足咆哮和红绿的要求之外,还应该做一些其他的事情。
我来自 CruiseControl 背景...但看起来事情应该更加明显。 有人有运行 Rails 的本机测试以及 Shoulda 和 Autotest 的经验吗?
更新|已解决显然seed-fu中的discover.rb文件使自动测试认为它正在测试RSpec,而不是Test::Unit。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在使用的插件seed-fu有一个discover.rb来“帮助”自动测试。 就我而言,虽然它让自动测试认为我正在运行 RSpec,但其他一切都崩溃了。
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.