包括带有自动测试的 Rails 引擎测试

发布于 2024-10-06 02:29:01 字数 204 浏览 1 评论 0原文

只是想知道是否有人知道将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

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

评论(1

蓝颜夕 2024-10-13 02:29:01

等等,这样可行,但您不想使用它?

如果您担心它会堵塞您的 .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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文