There is no notification when guard-rspec is used with spork

I am working on an ubuntu machine with Ruby-1.9.2 and rails-3.1.3. I use guard-rspec for self-testing and spork as a DRB server.

When I start protection without spork, it shows the correct notifications. But the whistle guard does not show any notifications.
Here is the important part of my gemfile

group :test, :development do gem 'rake', '0.9.3.beta.1' gem 'turn' gem 'rspec-rails' gem 'rspec' gem 'guard-rspec' gem 'spork' gem 'webrat' gem 'rb-fchange' gem 'rb-fsevent' gem 'libnotify' end 
+4
source share
1 answer

I know this is an old question, but found through Google and just struggling with the same problem.

The solution is pretty simple.

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

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

Add Guardfile to the beginning (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 
+2
source

Source: https://habr.com/ru/post/1387985/


All Articles