包括带有自动测试的 Rails 引擎测试
只是想知道是否有人知道将 Rails 引擎测试纳入自动测试的好方法?基本上,当我运行自动测试时,我希望首先运行所有应用程序测试,然后在我的引擎中运行测试。经过一番谷歌搜索后,我注意到了这个要点: 引擎自动测试 似乎需要经历很多事情 -想知道是否有一些更简单的东西我完全错过了。
Just wondered if anyone knew of a great way to include rails engine tests into autotest? Basically when I run autotest, I would like to have all of my app tests run first, then have the tests run in my engine. I noticed this gist after some googling: Autotest for Engines Seems kind of like a lot to have to go through - wondered if there was something simpler I was totally missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
等等,这样可行,但您不想使用它?
如果您担心它会堵塞您的 .autotest 您可以将其命名为其他名称:
将其另存为vendor/autotest/autotest_engines.rb
然后从您的.autotest中:
require 'vendor/autotest/autotest_engines'
PS 与 autotest/rails gem 相比,它并没有那么大,您可能也需要它:
https://github.com/grosser/autotest-rails /blob/master/lib/autotest/rails.rb
Wait, so that works but you don't want to use it?
If you're worried about having it clog up your .autotest you could name it something else:
Save it as vendor/autotest/autotest_engines.rb
Then from within your .autotest:
require 'vendor/autotest/autotest_engines'
P.S. It's not really that big compared to the autotest/rails gem, and you're probably requiring that too:
https://github.com/grosser/autotest-rails/blob/master/lib/autotest/rails.rb