README.md in guard-rspec-4.6.0 vs README.md in guard-rspec-4.6.1

- old
+ new

@@ -107,9 +107,36 @@ guard :rspec, cmd: 'rspec -f html -o ./tmp/spec_results.html', launchy: './tmp/spec_results.html' do # ... end ``` +### Integration with Zeus + +First, know that Guard::Zeus also generates a Guardfile template with RSpec commands - if you prefer Guard::RSpec, you may want to keep Guard::Zeus, but without the RSpec running commands (so you can manage the Guard::Zeus server instead of running it manually). + +Second, since Guard::RSpec 4.6.x, the output file name is passed using environment variables - but Zeus doesn't pass these when rerunning tests, so you get this error: #334 + +The workaround is to create a custom Zeus plan: + +1. `zeus init` +2. edit `custom_plan.rb` to contain the following: + +```ruby +require 'zeus/rails' + +class CustomPlan < Zeus::Rails + def test(*args) + ENV['GUARD_RSPEC_RESULTS_FILE'] = 'tmp/guard_rspec_results.txt' # Guard::RSpec::Runner::TEMPORARY_FILE_PATH + super + end +end + +Zeus.plan = CustomPlan.new +``` + +And that's it. (I'd like things to work without this, but I don't know how.) + + ### Using parallel_tests parallel_tests has a `-o` option for passing RSpec options, and here's a trick to make it work with Guard::RSpec: ```ruby