For some reason, I was using a really old guard and guard-minitest 0.4.x. Updating them to the current 2.x.x version solves my issues.
How to correctly run minitest with Guard, through zeus
-
29-06-2022 - |
Question
I have a Rails 4 application, tested with stock minitest. Zeus is set-up and working, so is Guard.
However, when I have Zeus running and fire Guard, it does not speed up: Guard does not seem to use Zeus for faster booting, despite having
guard 'minitest', :zeus => true do
end
in the guardfile. Is this simply not (yet) supported in Rails4? Am I missing some crucial bit of configuration?
Some additional details: when I run my tests with zeus rake test
they are slow; comparable to running them without zeus rake test
. When running with zeus test test/
they are ten times faster, but they run twice (a known issue, yet maybe a hint to what I am doing wrong?). Also not that I fire up Guard with bundle exec guard
, because that is what Guard tells me to do.
La solution 2
Autres conseils
Try using spring. https://github.com/jonleighton/spring
Add this to your gem file:
gem "spring"
Run bundle install.
Use this for your Guardfile:
guard "minitest", all_on_start: false, spring: true do
Remember the first time you run guard it will take the normal amount of time because it is loading the environment. After the first run it will significantly increase the loading speed.