我正在使用minitest的守卫,一切都很好,除了咆哮通知不起作用。
gem 'growl'
gem 'guard'
gem 'guard-minitest'
gem 'json'
gem 'minitest'
gem 'rack-test'
gem 'ruby_gntp'
gem 'sinatra'
guard :minitest do
watch(%r{^spec/(.*)_spec\.rb$})
watch(%r{^spec/test_helper.rb$})
watch('beacons_app.rb') { "spec/beacons_app_spec.rb" }
end
notification :gntp
(注意:我已尝试将"通知"行放在文件顶部)
如果我将bundle exec guard notifiers
gntp显示为可用:
+-------------------+-----------+------+--------+-------------+
| Name | Available | Used | Option | Value |
+-------------------+-----------+------+--------+-------------+
| gntp | ✔ | ✔ | title | "Notiffany" |
| | | | sticky | false |
+-------------------+-----------+------+--------+-------------+
| growl | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| terminal_notifier | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| libnotify | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| notifysend | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| notifu | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| emacs | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| tmux | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
| terminal_title | ✔ | ✔ | title | "Notiffany" |
+-------------------+-----------+------+--------+-------------+
| file | ✘ | ✘ | | |
+-------------------+-----------+------+--------+-------------+
Growl正在运行并正在运行(我可以在命令行使用growlnotify
成功发送它。)
当我运行bundle exec guard
时,我的测试运行正常,文件更改会触发测试在终端中重新运行,如预期的那样。但没有咆哮通知。
如何让它们发挥作用?
这是由guard-minitest中的一个错误造成的,现在已修复:https://github.com/guard/guard-minitest/commit/35ba44c2df7d25b8c3631be2571d3f1411e64185
答案 0 :(得分:3)
你检查了你的咆哮偏好吗?
我也会检查http://www.rubydoc.info/github/guard/guard/Guard/Notifier/Growl 确保您有正确的配置选项。如果这不起作用,请在https://github.com/guard/guard-minitest/issues
处打开一个问题更新:看起来这是防守最小的错误 https://github.com/guard/guard-minitest/issues/126