pezra / rspec-mode

An RSpec minor mode for Emacs
257 stars 112 forks source link

Add ability to execute external command after each spec run #130

Closed ignacy closed 7 years ago

ignacy commented 9 years ago

This adds rspec-notification-command. If this variable is set to something other then nil, it will be executed as a shell command after each spec run.

This can be used for system notification, especially in projects where Gemfile can't be changed and because of that projects such as https://github.com/twe4ked/rspec-nc can't be used.

For example I have (rspec-notification-command "terminal-notifier -message") in my custom-set-variables block, which in result gives me this when I run my specs:

rspec-notifications

pezra commented 9 years ago

An "after verification" hook is good idea. However, requiring it to be a shell command seems too narrow. Could we convert it into generic Elisp hook? That would allow arbitrary lisp ccode to be run after a verification (which could run shell commands when desired).

dgutov commented 9 years ago

@pezra That's what I was also thinking.