No notification when guard-rspec is used with spork

左心房为你撑大大i 提交于 2019-12-04 12:52:13

I know it is an old question, but found via Google and just struggle with same problem.

Solution is quite easy.

Use guard-spork (https://github.com/guard/guard-spork)

  gem 'guard-rspec'
  gem 'guard-spork'
  gem 'libnotify'

Add at the top of Guardfile (before rspec definition):

guard 'spork' do
  watch('config/application.rb')
  watch('config/environment.rb')
  watch(%r{^config/environments/.*\.rb$})
  watch(%r{^config/initializers/.*\.rb$})
  watch('Gemfile')
  watch('Gemfile.lock')
  watch('spec/spec_helper.rb') { :rspec }
  watch('test/test_helper.rb') { :test_unit }
  watch(%r{features/support/}) { :cucumber }
end

run

bundle exec guard
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!