After guard starts, if a class was changed in a way that caused an error to be raised on load, the error was raising up into the guard stack, which caused the jruby-rspec guard to get fired / deactivated. Guard needed to be reloaded to continue testing.
This problem doesn't exist in guard-rspec because it performs all of its runs in a separate process using system or DRb. This is necessary since the rspec tests run in the guard process.
After guard starts, if a class was changed in a way that caused an error to be raised on load, the error was raising up into the guard stack, which caused the jruby-rspec guard to get fired / deactivated. Guard needed to be reloaded to continue testing.
This patch instead outputs the error and its stacktrace using
Guard::UI.error
, cancels the current test run, and continues listening for changes.