Search code examples
rspecguard

rspec tests always show failure using terminal-notifier-guard


Although all my specs show as passing in my terminal, the notification ALWAYS shows they failed. Its a pretty simple setup, but do i have something misconfigured? How can i troubleshoot this?

Gemfile

group :development do
  gem 'guard'
  gem 'guard-rspec'
  gem 'rspec'
  gem 'terminal-notifier-guard'
end

Guardfile

notification :terminal_notifier
guard :rspec, all_after_pass: true, all_on_start: true do
  # ...
end

Solution

  • The problem was guard was not configured to run rspec using bundle exec

    guard :rspec, cmd: 'bundle exec rspec' do
      ...
    end