mardi 19 décembre 2017

How does one configure Guard to run Rails 5 system tests?

By default rails test does not run system tests, and one must invoke rails test:system in order to run the system tests. Given that one is using Guard, what is the proper addition to the Guardfile such that guard will:

  1. Run all the tests, including the system tests.
  2. Run the appropriate system test when it changes.

I have tried something like:

guard :minitest, spring: true do
  # ...
  watch(%r{^test/system\/?(.*)_test\.rb$})  { 'test' }
  # ...
end

But it seems I am not educated in configuring Guard.

Aucun commentaire:

Enregistrer un commentaire