From 3aa75d62c49b8bebbe4e475bc06324ff0418b677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 7 Jun 2024 20:05:54 +0200 Subject: [PATCH 1/2] Don't use Spring when running bin/rspec This command wasn't working since we removed the spring-commands-rspec gem in commit e4e0cb5d4. --- bin/rspec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/rspec b/bin/rspec index b50d67608..43b6017d5 100755 --- a/bin/rspec +++ b/bin/rspec @@ -1,9 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError => e - raise unless e.message.include?("spring") -end # frozen_string_literal: true # # This file was generated by Bundler. From 16008b578866a8448fb5aad55d3c7f4332921e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 7 Jun 2024 20:17:03 +0200 Subject: [PATCH 2/2] Add a note regarding CI when running the tests Many developers run `bin/rspec` and then are (reasonably) confused when running the tests takes too long. So we're clarifying that running the whole test suite should be done using a CI, and only relevant tests should be run while developing on your machine. --- README.md | 4 +++- README_ES.md | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebafaf35d..66fcafadb 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,14 @@ Run the app locally: bin/rails s ``` -Run the tests with: +You can run the tests with: ```bash bin/rspec ``` +Note: running the whole test suite on your machine might take more than an hour, so it's strongly recommended that you setup a Continuous Integration system in order to run them using parallel jobs every time you open or modify a pull request (if you use GitHub Actions or GitLab CI, this is already configured in `.github/workflows/tests.yml` and `.gitlab-ci.yml`) and only run tests related to your current task while developing on your machine. When you configure the application for the first time, it's recommended that you run at least one test in `spec/models/` and one test in `spec/system/` to check your machine is properly configured to run the tests. + You can use the default admin user from the seeds file: **user:** admin@consul.dev diff --git a/README_ES.md b/README_ES.md index 71b11dd6c..49e148db7 100644 --- a/README_ES.md +++ b/README_ES.md @@ -55,6 +55,8 @@ Para ejecutar los tests: bin/rspec ``` +Nota: ejecutar todos los tests en tu máquina puede tardar más de una hora, por lo que recomendamos encarecidamente que configures un sistema de Integración Continua para ejecutarlos utilizando varios trabajos en paralelo cada vez que abras o modifiques una PR (si usas GitHub Actions o GitLab CI, esto ya está configurado en `.github/workflows/tests.yml` y `.gitlab-ci.yml`) y cuando trabajes en tu máquina ejecutes solamente los tests relacionados con tu desarrollo actual. Al configurar la aplicación por primera vez, recomendamos que ejecutes al menos un test en `spec/models/` y un test en `spec/system/` para comprobar que tu máquina está configurada para ejecutar los tests correctamente. + Puedes usar el usuario administrador por defecto del fichero seeds: **user:** admin@consul.dev