【问题标题】:Rails rspec-guard runs multiple timesRails rspec-guard 运行多次
【发布时间】:2014-03-12 09:52:43
【问题描述】:

我刚刚更新了我的 rspec 和 guard 安装,因为在我使用 bundle exec guard 启动后,每次更改后,guard 都会运行 3 次。好吧,现在只要我更改代码中的某些内容,它就会运行 5 次。

这是我在运行bundle exec guard时得到的终端输出消息

10:45:30 - INFO - Guard is using TerminalTitle to send notifications.
10:45:30 - INFO - Guard::RSpec is running
10:45:30 - INFO - Guard::RSpec is running
10:45:30 - INFO - Guard::RSpec is running
10:45:30 - INFO - Guard::RSpec is running
10:45:30 - INFO - Guard::RSpec is running
10:45:30 - INFO - Guard is now watching at '/Users/me/myProject'
10:45:38 - INFO - Running: spec/features/admin_area_spec.rb

我认为可能在某个地方听者或其他东西开始了五次,但我找不到它。

更新 我正在使用guard-rspec-4.2.8rspec-2.14.1guard-2.5.1

【问题讨论】:

  • 您使用的是什么版本的 RSpec、guard 和 guard-rspec?如果你能提供一个带有 bug 的示例应用程序,你就可以在guard-rspec 上创建一个票证。
  • 我用其他信息更新了问题。好吧,它是一个已经投入生产的应用程序,因此出于示例目的提取其中的一部分并不容易。 rspec/guard 配置文件是否足够?

标签: ruby-on-rails rspec guard


【解决方案1】:

好的,我发现我在保护文件中有多次保护启动代码。删除所有这些,但一个解决了问题。

【讨论】:

  • 喜欢在哪里?我正在和bundle exec guard --group fast_tests,lints --wait-for-delay 1一起跑卫
猜你喜欢
  • 1970-01-01
  • 2019-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-31
相关资源
最近更新 更多